简体   繁体   中英

Communicate Web Application Cross-platform with cookies

I have some project in my office. The project is using sso (single sign on), and then i have 3 web application in my domain. The problem is i use different web application technology (example : dotnet core, ionic pwa, react.js). The question is can i communicate with 3 web application which is different language programming with cookies? or maybe there is another solution? (Sorry my english is bad)

If the applications run under the same domain, it is possible to use a cookie to store the authentication status. You could store the UserId encrypted with a private key, and have the respective applications decrypt the cookie.

Say your user logs on to the react application, and that stores a cookie called AuthCookie with all the necessary information.

When that same user access your .NET core application, the client sends over the cookie to the server, and you can have it try to decrypt it with the private key, and use Identity or some other authentication framework take over from there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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