Skip to content

Commit

Permalink
fix(refresh): set nextURL on failed refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
anehx committed Sep 27, 2024
1 parent c86dd66 commit 7dee0f8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion addon/authenticators/oidc.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,14 @@ export default class OidcAuthenticator extends BaseAuthenticator {

// Failed refresh
const isBadRequest = isBadRequestResponse(response);
if (isBadRequest) return Promise.reject(data);
if (isBadRequest) {
this.session.set(
"data.nextURL",
redirectUri.replace(location.origin, ""),
);

return Promise.reject(data);
}

// Store the redirect URI in the session for the restore call
data.redirectUri = redirectUri;
Expand Down

0 comments on commit 7dee0f8

Please sign in to comment.