Custom Single Sign On using Angular.js

I have 3 websites developed upon Angular.js 1.5.8. Now, I would like to connect them to one single sign on web application and manage their authentication from one place. Without using any external libraries or frameworks, how can i achieve this?. For instance, sending credentials from single sign on web application by simple routing at Angular.js seems very difficult. On the other hand, when user logs out from one client, how do the other websites understand that they should logout?

Upvotes: 0

Views: 1935

Answers (1)

pravs
pravs

Reputation: 379

I think you need to spend time on reading OAuth.

https://en.wikipedia.org/wiki/OAuth

Basically it goes like this. Lets say i want to log in to stack overflow and do not want to create an account here . I choose google to provide my identity . when you try to login it goes to google and asks for my account authentication. when i chose allow, google becomes my idenity provider.

Till the time i am active on google, stackoverflow would keep getting up the token. Logout from google means my identity can now not be verified in absence of token !

Upvotes: 1

Related Questions