Implement Single Sign On
Follow the links below for provider setup based on your single sign on requirement.
I already have a web app and login functionality and would like to add an ability for my users to login using their existing identities in application like Google, Facebook etc.
Once implemented I would like to map the my internal userId to the user's publicly shared emailId.
The external identity provider will give me the publicly shared emailId.
The document assumes that the login flow involves 3 pages. They have been separated for ease of understanding the implementation process. Feel free to club the logic based on your implementation.
- Login (referred to as: LOGIN_PAGE_URL)
- Session Validator (referred to as: SESSION_VALIDATOR_PAGE_URL)
- Home (referred to as: LOGIN_PAGE_URL)
The modules loaded here are pinc.auth.min and ui.auth. To learn more about module dependencies go Module dependencies .
data-user-id
This property is not used by the pinc.auth module. The module assumes an anonymous user at this stage.
Add a div with a class name or id and where you want the login buttons to be rendered.
The session validator page is used as an intermediate page to either send the user to the home page or back to login. This page is usually merged with the home page to avoid too many redirects. We have included it in this document for clarity in understanding.
The home page is the landing page for your user once they are logged in successfully.