mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 05:10:45 +00:00
Update to clearAuthenticationMetaDataLocalStorage upon 401
This commit is contained in:
@ -127,7 +127,7 @@ export default function App()
|
|||||||
})();
|
})();
|
||||||
}, [loadingToken]);
|
}, [loadingToken]);
|
||||||
|
|
||||||
if(needLicenseKey)
|
if (needLicenseKey)
|
||||||
{
|
{
|
||||||
(async () =>
|
(async () =>
|
||||||
{
|
{
|
||||||
@ -245,7 +245,7 @@ export default function App()
|
|||||||
component: <AppHome app={metaData.apps.get(app.name)} />,
|
component: <AppHome app={metaData.apps.get(app.name)} />,
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!foundFirstApp)
|
if (!foundFirstApp)
|
||||||
{
|
{
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// keep track of what the top-most app the user has access to is. set that as their default route //
|
// keep track of what the top-most app the user has access to is. set that as their default route //
|
||||||
@ -396,7 +396,7 @@ export default function App()
|
|||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
// iterate through the list to find the 'main dashboard so we can put it first' //
|
// iterate through the list to find the 'main dashboard so we can put it first' //
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
if(metaData.appTree && metaData.appTree.length)
|
if (metaData.appTree && metaData.appTree.length)
|
||||||
{
|
{
|
||||||
for (let i = 0; i < metaData.appTree.length; i++)
|
for (let i = 0; i < metaData.appTree.length; i++)
|
||||||
{
|
{
|
||||||
@ -437,6 +437,8 @@ export default function App()
|
|||||||
{
|
{
|
||||||
if ((e as QException).status === "401")
|
if ((e as QException).status === "401")
|
||||||
{
|
{
|
||||||
|
qController.clearAuthenticationMetaDataLocalStorage();
|
||||||
|
|
||||||
//////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////
|
||||||
// todo - this is auth0 logout... make more generic //
|
// todo - this is auth0 logout... make more generic //
|
||||||
//////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////
|
||||||
|
Reference in New Issue
Block a user