Error for login/callback url after login

Hi Team,
Once we enter login creds . For login/callback url we are getting white blank screen
Url : [ .
Also, I check console, I found below error,
Uncaught SyntaxError: Unexpected token ‘<’
runtime.1e67b41….js polyfills.ba27af3….js

Sounds like the /authorize call succeeded and an authorization code is getting returned back to your application, but is getting stuck there.

Are you using one of Okta’s SDKs for the callback route (to exchange the authorization code for tokens)? Happen to have a code snippet you can share?

1 Like

{ path: 'login/callback', component: OktaCallbackComponent },


export class AppComponent implements OnInit{
  public isAuthenticated$!: Observable<boolean>;

  constructor(@Inject(OKTA_AUTH) private oktaAuth: OktaAuth, public oktaStateService: OktaAuthStateService,private router: Router) {


  public ngOnInit(): void {
    this.isAuthenticated$ = this.oktaStateService.authState$.pipe(
      filter((s: AuthState) => !!s),
      map((s: AuthState) => s.isAuthenticated ?? false)

  public async signIn(): Promise<void> {
    await this.oktaAuth.signInWithRedirect().then(
      _ => this.router.navigate(['/profile'])

  public async signOut(): Promise<void> {
    await this.oktaAuth.signOut();


 <ng-container *ngIf="(isAuthenticated$ | async) === false; else signout">
        <button (click)="signIn()"> Sign in </button>

      <ng-template #signout>
        <button (click)="signOut()">Sign out</button>


import oktaConfig from './app.config';
const oktaAuth = new OktaAuth(oktaConfig.oidc);
{ provide: OKTA_CONFIG, useValue: { oktaAuth } }


export default {
  oidc: {
    clientId: 'eteteteteetetetetetet',
    issuer: '',
    redirectUri: window.location.origin + '/login/callback'