Hi I have implemented the angular side code like
–class LoginComponent–
async OktaLogin(){
let res =await this.oktaAuth.token.getWithPopup(this.tokenParams);
this.loginService.oktaLoginStatusChangeCallback(res);
}
–class LoginService–
public oktaLoginStatusChangeCallback(resp){
const model = new ExternalAuthenticateModel();
model.authProvider = ExternalLoginProvider.OPENID;
model.providerAccessCode = resp.tokens.accessToken.value;
model.providerKey = resp.code;
model.singleSignIn = UrlHelper.getSingleSignIn();
model.returnUrl = UrlHelper.getReturnUrl();
this._tokenAuthService.externalAuthenticate(model)
.subscribe((result: ExternalAuthenticateResultModel) => {
if (result.waitingForActivation) {
this._messageService.info('You have successfully registered. Waiting for activation!');
return;
}
this.login(result.accessToken,
result.encryptedAccessToken,
result.expireInSeconds,
result.refreshToken,
result.refreshTokenExpireInSeconds,
false,
'',
result.returnUrl);
});
}
_______________________________________________________________
and in the server code, I put this code -
https://support.aspnetzero.com/QA/Questions/5773#answer-eaebc7a4-d0aa-31ee-eeb0-39e9948957ea
, but in the code –
OpenIdConnectAuthProviderApi >> ValidateToken >> var principal = new JwtSecurityTokenHandler().ValidateToken(token, validationParameters, out var rawValidatedToken);
i’m getting this error –
IDX10501: Signature validation failed. Unable to match key:
kid: '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.
Exceptions caught:
'[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.
token: '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'.