Error redirecting after login with angular 10

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’])
);
}

you want to try changing above to the final landing page after successfully login in okta?

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.

This is the route, after login. I would like it to be redirected.

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.

It worked again, I believe it was something on the server side that provides the authentication, Apparently my code was correct. but thank you.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.