Getting stuck on signinRedirectCallback #1320
Description
I'm working on angular 10, implemented the auth service which works most of the time but occasionally getting stuck on login screen:
Error - > error: "invalid_grant"
error_description: "The specified authorization code is invalid."
Not sure why it works and suddently it stops working.
// config
const stsSettings = {
authority: ${this.ssoissuer}/auth
,
client_id: environment.ssoclientid,
redirect_uri: ${this.host}/signin-callback
,
scope: 'openid email profile offline_access',
response_type: 'code',
post_logout_redirect_uri: ${this.host}/signout-callback
,
revokeAccessTokenOnSignout: true,
automaticSilentRenew: false,
silent_redirect_uri: ${this.host}/assets/silent-callback.html
};
// AuthService complete login which seems to have a problem from time to time
public completeLogin(): Promise {
return this.userManager.signinRedirectCallback().then(user => {
this.user = user;
this.loginChangedSubject.next(!!user && !user.expired);
return user;
});
}