Edit, my issue seems to be that isAuthenticated returns null, is there any documentation on how this should work?
I’ve modified the code in my Home.js to have this code:
async checkAuthentication() {
const authenticated = await this.props.auth.isAuthenticated();
console.log("Authenticated as " + authenticated); //<-- added logging
if (authenticated !== this.state.authenticated) {
this.setState({ authenticated });
}
}
When I press Logon, the output I’m seeing that the result of the isAuthenticated() call is “null”
Why and how can I find out why I am not getting any result back?
I’ve partially figured out what is going on.
if I’m at localhost:3000/ then press login, Okta is redirecting me back to this URI after logging in.
The /implicit/callback is never triggered as that is not the URI that I’m redirected back to.
So I think I am confused on what should go where,
Should the implicit callback be at /implicit/callback, and is that the redirect uri that should be available in the Admin dashboard?
This is how I read the example. but doing so will result in the user not being logged into the APP.
If I instad change the route path of the implicit callback to be just / then it gets triggered after the login, and I get the correct information.
I’m not sure if I’m holding it wrong, or if the tutorial is wrong or if there is a bug in the SDK.
Following the React SDK point by point, will result in an error saying that the URI (/ which is Home) is not whitelisted.
I could use some helping hand here
I found the issue
In one if the examples, there is this code
redirectUri: window.location.origin + '/implicit/callback', //<-- redirectUri
clientId: clientId
}
and in another snippet there is this:
redirect_uri={config.redirectUri} > //<-- redirect_uri
using the same in both places solved the issue.
We’re glad to see you figured it out!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.