首页 > 解决方案 > 使用 Auth0 的角度 UI 中的 localStorage 问题

问题描述

mysite.com/{integerid}/home我有一个 Windows 应用程序,用户将在我的 Angular UI 上启动一个特定的路径( )。

我在我的 Angular UI 上设置了 auth0 身份验证,所以一旦上面的 URL 启动,我将参数保存integerid在 localStorage 中,然后浏览器重定向到 auth0 的 Microsoft 登录,然后返回到我正在检索的回调 URLintegerid并返回mysite.com/{integerid}/home.

问题是由于重定向远离mysite.com我认为我丢失了我保存为的值integeridlocalStorage所以在验证用户在 URL 上的 URL 之后会发生什么mysite.com/null/home

知道如何解决这个问题吗?

标签: angularauth0angular-local-storage

解决方案


推荐阅读