mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Merge pull request #10250 from strapi/fix/sso
Fix SSO success redirection
This commit is contained in:
commit
311d8e10e5
@ -28,6 +28,8 @@ const AuthResponse = () => {
|
||||
try {
|
||||
const jwtToken = Cookies.get('jwtToken');
|
||||
|
||||
auth.clearAppStorage();
|
||||
|
||||
if (jwtToken) {
|
||||
auth.setToken(jwtToken, true);
|
||||
const requestUrl = getRequestUrl('users/me');
|
||||
@ -49,7 +51,7 @@ const AuthResponse = () => {
|
||||
redirectToOops();
|
||||
}
|
||||
|
||||
if (authResponse === 'success' && !auth.getToken()) {
|
||||
if (authResponse === 'success') {
|
||||
fetchUserInfo();
|
||||
}
|
||||
}, [authResponse, fetchUserInfo, redirectToOops]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user