OktaCallbackComponent Unable to Redirect Angular 17

Application URL where stuck: http://localhost:8039/implicit/callback?code=MvVYzk56y5rXy9W9f5YEYSWPk5ic4xvxJObEMeeLeg0&state=GKuwrw3fzYgrWYDFe0ajxIlG0LGT1qHFhEO0NnHO7XhQLa1hU5f9Ttv1lcMIkycd
Route: { path: ‘implicit/callback’, component: OktaCallbackComponent }
app.module.ts:
const oktaAuth = new OktaAuth({
issuer: environment.okta_org_issuer,
clientId: environment.okta_client_id,
redirectUri: environment.redirectUri,
scopes: [‘openid’, ‘profile’, ‘offline_access’]
});
providers: [
importProvidersFrom(OktaAuthModule.forRoot({oktaAuth})),
]

Login component:
this.oktaAuth.signInWithRedirect();

Package.json:
@okta/okta-angular”: “^6.4.0”,
@okta/okta-auth-js”: “^7.8.1”,
@okta/okta-signin-widget”: “^7.24.0”,

Note: No CORS issue in console.

Tried this
devMode: true

got this

{accessToken: undefined, idToken: undefined, refreshToken: undefined, isAuthenticated: false}

FYI,
I have finally resolved this issue. In my redirectUri, there was an extra ‘/’ at the last (i.e., “http://localhost:8039/implicit/callback/”). The same was present in the Okta portal as well, and previously, it was working. So, I didn’t change the application portal but changed my application environment file, and it is working fine.

Thanks :slight_smile:

Hello @monimoy,
Thank you for the follow-up.

I’m happy to hear that the issue was resolved. It is always good to check the app environment file first, for this type of issue.