Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if refresh token is undefined and do not store it in this case #2260

Merged
merged 1 commit into from
Dec 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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