Skip to content

Commit

Permalink
Merge pull request #439 from cultuurnet/feat/UIT-264-authentication-c…
Browse files Browse the repository at this point in the history
…hange

UIT-264: clear auth0 session on logout and remove login prompt
  • Loading branch information
samvanhoeyicapps authored Dec 12, 2024
2 parents a792f95 + 67ed9b8 commit ab21fc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/_context/AuthenticationContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const AuthenticationProvider: FC<PropsWithChildren> = ({ children }) => {
const logout = useCallback(async () => {
try {
await client.credentialsManager.clearCredentials();
await client.webAuth.clearSession();

// Clear react query cache
const queryCache = new QueryCache({});
Expand All @@ -61,7 +62,7 @@ const AuthenticationProvider: FC<PropsWithChildren> = ({ children }) => {
} catch (e) {
log.error(e);
}
}, [client.credentialsManager, setIsAuthenticated]);
}, [client.credentialsManager, client.webAuth, setIsAuthenticated]);

const checkAndRenewCredentials = useCallback(async () => {
if (!client) return;
Expand Down
1 change: 0 additions & 1 deletion src/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const Login = () => {
{
audience: Config.REACT_NATIVE_APP_AUTH0_AUDIENCE,
product_display_name: 'UiTPAS',
prompt: 'login',
referrer: 'uitpas',
scope: 'openid profile email offline_access',
},
Expand Down

0 comments on commit ab21fc6

Please sign in to comment.