File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
src/components/AdminRegisterPage Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 11import React , { useEffect } from 'react' ;
22import { useNavigate , useParams } from 'react-router-dom' ;
33import { logError } from '@edx/frontend-platform/logging' ;
4- import { getAuthenticatedUser , getLogoutRedirectUrl } from '@edx/frontend-platform/auth' ;
4+ import { getAuthenticatedUser } from '@edx/frontend-platform/auth' ;
55import { LoginRedirect , getProxyLoginUrl } from '@edx/frontend-enterprise-logistration' ;
66import { isEnterpriseUser , ENTERPRISE_ADMIN } from '@edx/frontend-enterprise-utils' ;
77
@@ -24,10 +24,9 @@ const AdminRegisterPage = () => {
2424 // account activation page to ensure they verify their email address.
2525 navigate ( `/${ enterpriseSlug } /admin/register/activate` ) ;
2626 } else {
27- // user is authenticated but doesn't have the `enterprise_admin` JWT role; force a log out so their
28- // JWT roles gets refreshed. on their next login, the JWT roles will be updated.
29- const logoutRedirectUrl = getLogoutRedirectUrl ( getProxyLoginUrl ( enterpriseSlug ) ) ;
30- global . location . href = logoutRedirectUrl ;
27+ // user is authenticated but doesn't have the `enterprise_admin` JWT role; redirect to
28+ // proxy login to refresh JWT cookie and pick up any new role assignments.
29+ global . location . href = getProxyLoginUrl ( enterpriseSlug ) ;
3130 }
3231 } ;
3332
You can’t perform that action at this time.
0 commit comments