Gilmar
September 19, 2022, 8:17pm
1
Hi, I’m new with okta.
I followed the documentation, but the redirect after login doesn’t work. I get the error “AuthSdkError: Could not load PKCE codeVerifier from storage. This may indicate the auth flow has already completed or multiple auth flows are executing concurrently”. What to do?
“@angular /core”: “~10.1.3”,
“@okta /okta-angular”: “^5.1.1”,
“@okta /okta-auth-js”: “^6.0.0”,
const routes: Routes = [
{ path: ‘private/authorization-code/callback’, component:OktaCallbackComponent },
{ path: ‘private’, component: MenuPrivateComponent, canActivate: [OktaAuthGuard],
children: [
const oktaAuth = new OktaAuth({
issuer: environment.OKTA_URL,
clientId: environment.CLIENT_ID,
redirectUri: window.location.origin + ‘/radar/private/authorization-code/callback’,
logoutUrl: window.location.origin + ‘/radar/public/login.do’
});
public async signIn() : Promise {
await this._oktaAuth.signInWithRedirect().then(
_ => this.router.navigate([‘private’])
);
}
nicksgg
September 21, 2022, 12:49am
2
you want to try changing above to the final landing page after successfully login in okta?
nicksgg
September 21, 2022, 1:30am
3
Sorry, misread your code in my previous response.
I am working on Vue and using signInWithRedirect for social login with the following param. Not sure if it works for you.
authClient
.signInWithRedirect({
originalUri: "/login/callback",
idp: "<idps.id>" // for my configured social login
})
“/login/callback” is my configured router path for the callback component.
Gilmar
September 21, 2022, 12:22pm
4
This is the route, after login. I would like it to be redirected.
Gilmar
September 21, 2022, 12:24pm
5
nicksgg:
Sorry, misread your code in my previous response.
I am working on Vue and using signInWithRedirect for social login with the following param. Not sure if it works for you.
Basically it’s the same thing, only in angular, it was declared in a constant, because for angular this is how it is in the documentation.
redirectUri: window.location.origin + ‘/radar/private/authorization-code/callback’,
Hey there!
I haven’t seen that PKCE error before. To help isolate the problem and to do a gut-check, would you mind trying your config settings in this example getting-started app? Let’s see if we can figure out what’s going on.
Gilmar
September 22, 2022, 7:34pm
7
It worked again, I believe it was something on the server side that provides the authentication, Apparently my code was correct. but thank you.
system
Closed
September 23, 2022, 7:35pm
8
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.