Skip to content

Commit

Permalink
now cleans the URI after sign in (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
runeanielsen authored Aug 14, 2024
1 parent 9a2f42c commit a5d6f47
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,18 @@ const oidcConfig = {
redirect_uri: Config.AUTH_REDIRECT_URL,
};

// This is used to clear the history after the sign-in redirect.
const onSigninCallback = (_user: any | void): void => {
window.history.replaceState(
{},
document.title,
window.location.pathname
)
}

ReactDOM.render(
<React.StrictMode>
<AuthProvider {...oidcConfig}>
<AuthProvider {...oidcConfig} onSigninCallback={onSigninCallback}>
<AuthWrapperProvider>
<UserProvider>
<MapProvider>
Expand Down

0 comments on commit a5d6f47

Please sign in to comment.