So I assume that e.g. I login to login.app.com as *[email protected]*, 
then your login API returns something like: *{ accessToken: ..., domain: 
mydomain }*, and then login form redirects me to mydomain.app.com. Yes, in 
that case, you'd likely lose all that extra info.

Now, first the simpler attempt: can you host the login form on each site 
directly, and then just call the common login *API *endpoint from there? 
That would work better.

Otherwise you'll have to pass some sort of a token from your login.app.com 
page, and then on app init, you can go and check that token and get that 
original response again. E.g. login.app.com will get *{ domain: myDomain, 
authToken: 'some_value' }*, and redirect you to 
*mydomain.app.com/authenticate?**auth**Token=some_value*, and then the 
/authenticate page on mydomain.app.com will take this token, again go back 
to some backend API, and fetch the original *accessToken* or user data or 
whatever, then redirect you to / or whatever. Basically something like 
OAuth. You'd have to deal with these status/refresh/whatever tokens, make 
sure they expire on time and all that on the backend, but if that's the 
requirement, than that's the requirement :)

Anyway, hope that helps, but if you provide more details on what goes on on 
your login.app.com, someone might come up with a better proposal.

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to