Skip to content

Commit

Permalink
fix: #688 preserve id_token if there none on response
Browse files Browse the repository at this point in the history
  • Loading branch information
pamapa committed Sep 16, 2022
1 parent a806ab8 commit ea6475f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ResponseValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ export class ResponseValidator {
this._validateIdTokenAttributes(response, state.id_token);
logger.debug("ID Token validated");
}
else if (state.id_token) {
// if there's no id_token on the response, copy over id_token from original request
response.profile = JwtUtils.decode(state.id_token) as UserProfile;
}

await this._processClaims(response, false, hasIdToken);
logger.debug("claims processed");
Expand Down

0 comments on commit ea6475f

Please sign in to comment.