The code which i have here gives me the authresult object in my console but i get the value as Null for idToken
<---- App.js ---->
import React from ‘react’;
import logo from ‘./logo.svg’;
import ‘bootstrap/dist/css/bootstrap.min.css’;
import ‘./App.css’;
import Apicall from ‘./Apicall’;
import Header from ‘./components/Header’;
import Auth0Lock from ‘auth0-lock’;
class App extends React.Component{
constructor(){
super();
this.state ={
idToken:‘’,
profile:{}
};
}
static defaultProps = {
clientID:“0wESJsu7YgBK8EUUADH9qOBXTP5P5duz” ,
domain :“dev-thsfactory47.auth0.com”
}
componentWillMount(){
this.lock = new Auth0Lock(‘0wESJsu7YgBK8EUUADH9qOBXTP5P5duz’,‘dev-thsfactory47.auth0.com’);
this.lock.on(“authenticated”, (authResult)=>{
console.log(authResult);
});
}
showLock(){
this.lock.show();
}
render(){
return (
);
}
}
export default App;
Allowed Callback URLs | Allowed Web Origins | Allowed Logout URLs
Allowed Origins (CORS) are all set as http://localhost:3000/
----------------------------------------Value in Console----------------------------------------------------------------------------------
-
{accessToken: “BPWOxQMHDXvdq-1rB8FJPnngt5mM93BR”, idToken: null, idTokenPayload: null, appState: null, refreshToken: null, …}
-
accessToken: “BPWOxQMHDXvdq-1rB8FJPnngt5mM93BR”
-
appState: null
-
expiresIn: 7200
-
idToken: null
-
idTokenPayload: null
-
refreshToken: null
-
scope: null
-
state: “VvrtO43HpACk3mSgRSxOkv~P2cXKxabr”
-
tokenType: “Bearer”
Kindly help