简体   繁体   English

使用Auth0的Angular2单点登录?

[英]Angular2 single sign on with Auth0?

I'm trying to use auth0 sso (single sign on ) with angular 2 but it doesn't work , and my question it's that angular 2 support sso authentification or not ? 我正在尝试对Angular 2使用auth0 sso(单点登录),但它不起作用,我的问题是Angular 2是否支持sso身份验证? or is there any other solution ? 还是有其他解决方案?

Make sure Both of your domains are sub domains of a domain as local storage works in same domain (local storage is domain specific) 确保两个域都是域的子域,因为本地存储在同一域中工作(本地存储是特定于域的)

you can write a service where you can use localStorage.getItem(key); 您可以编写一个可以在其中使用localStorage.getItem(key); to retrive data from local storage and use it in your application 从本地存储中检索数据并在您的应用程序中使用

In angularJS use angularJS code to put and get data from the local storage and in angular 2/4 use typescript code to get/put into local storage. 在angularJS中,使用angularJS代码从本地存储中放置和获取数据;在angular 2/4中,使用打字稿代码获取/放入本地存储。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM