How to Realize Single Sign-on by Separating Front and Back End?


Suppose api interface is
The login operation was completed in
When visiting and
After the user login, the backend will return a token to identify the user
Neither cookie nor localStorage can be accessed across domains. how can I get the user id and save the user status across sites?
After logging in like Taobao, I was already logged in when I visited Tmall.
Ask for a solution

I saw it this morning.From the Nuggets