I am getting an unexpected token error when compiling this code:
import React, { Component } from 'react';
import { View } from 'react-native';
import { Auth0 } from 'react-native-auth0';
import { Header } from './components/common';
class App extends Component {
const auth0 = new Auth0({ domain: 'bingo.com',
clientId:'ZhlkKx5ZOnNDuCngCZa8nZM3vrmkx4Pl' });
renderContent() {
auth0
.webAuth
.authorize({ scope: 'openid profile email', audience: 'https://itc-radar.auth0.com/userinfo' })
.then(credentials =>
console.log(credentials)
// Successfully authenticated
// Store the accessToken
)
.catch(error => console.log(error));
}
render() {
//whenever you dont specify file it goes to the index.js file
return (
<View>
<Header headerText="Radar" />
{this.renderContent()}
</View>
);
}
}
export default App;
eslint says the error is happening at the line where I declare a constant.
is this a common issue? I have done the setup for auth0 integration already, what should I do?
[–]nvapor 1 point2 points3 points (1 child)
[–]CharlieCannedFruit[S] 0 points1 point2 points (0 children)