website logo
⌘K
GETTING STARTED
Getting started with Pathfix
Introduction
OAuth Connect Page
Custom Redirect Domain
Monitoring Activity
Workspace
Extensions
Security
Notifications
Event Callback
Scopes
Provider reference
Access tokens
SDK's
BUBBLE.IO INTEGRATION
Bubble.io Documentation
ADALO INTEGRATION
Adalo Documentation
Adalo User Authorization
Adalo API Call
DEVELOPER CENTER
Developer center
Pathfix Consent Screen (preview)
Module dependencies
Step-by-Step
General
JavaScript
PROVIDER SETUP DOCS
Integration Setup Docs
Identity Auth
Integrating with Airtable
Integrating with Box
Integrating with Hubspot
Integrating with GitHub
Integrating with Google Tasks
Integrating with Instagram Graph API
Integrating with LinkedIn
Integrating with Pipedrive
Integrating with Quickbooks
Integrating with Stripe
Integrating with Stripe-Server
Integrating with Slack
Integrating with TikTok
Integrating with Typeform
Integrating with WooCommerce
Integrating with Xero
Integrating with Zoom
Docs powered by archbee 
20min

Implement Single Sign On

Follow the links below for provider setup based on your single sign on requirement.

Integration Setup Docs

Pathfix keys

Use Case

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.

Assumptions

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)

Login Page

Add the $pinc_onload with render



JS
|

Add the Pathfix helper script

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.



HTML
|

Add the login container to your <body>

Add a div with a class name or id and where you want the login buttons to be rendered.

HTML
|

All together

HTML
|



Session Validator Page

Add the $pinc_onload without render

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.

JS
|

Add the script tag

HTML
JS
|

All together

HTML
|



Home Page

The home page is the landing page for your user once they are logged in successfully.

Add the $pinc_onload without render

JS
|

Add the script tag

HTML
JS
|















Updated 28 Jul 2022
Did this page help you?
Yes
No
UP NEXT
Creating Custom OAuth Button
Docs powered by archbee 
TABLE OF CONTENTS
Use Case
Assumptions
Login Page
Add the $pinc_onload with render
Add the Pathfix helper script
data-user-id
Add the login container to your <body>
All together
Session Validator Page
Add the $pinc_onload without render
Add the script tag
All together
Home Page
Add the $pinc_onload without render
Add the script tag