How to remove token from callback URL?

What it the best approach to removing the token from the callback URL after parsing it?

https://localhost:44325/#id_token=TOKEN

handleAuthentication() {
return new Promise((resolve, reject) => {
this.auth0.parseHash((err: any, authResult: any) => {
if (err) return reject(err);
if (!authResult || !authResult.idToken) {
return reject(err);
}

    this.idToken = authResult.idToken;
    this.profile = authResult.idTokenPayload;
    // set the time that the id token will expire at
    this.expiresAt = authResult.idTokenPayload.exp * 1000;
    resolve();
  });
});

}

Hello!

What kind of application are you using? (Regular web application or SPA) and what language are you using?

Thanks.

1 Like