Skip to content

Commit

Permalink
Check if refresh token is undefined and do not store it in this case (
Browse files Browse the repository at this point in the history
  • Loading branch information
tippexs authored Dec 9, 2021
1 parent 6b6c675 commit 2c653da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/configs/oidc/openid_connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ function auth(r) {
r.variables.session_jwt = tokenset.id_token; // Update key-value store

// Update refresh token (if we got a new one)
if (r.variables.refresh_token != tokenset.refresh_token) {
// 12.2021 - In rare cases the IdP does not include the refresh-token in the response. The rt will be undefined in this case.
if (r.variables.refresh_token != tokenset.refresh_token && tokenset.refresh_token != undefined) {
r.log("OIDC replacing previous refresh token (" + r.variables.refresh_token + ") with new value: " + tokenset.refresh_token);
r.variables.refresh_token = tokenset.refresh_token; // Update key-value store
}
Expand Down

0 comments on commit 2c653da

Please sign in to comment.