Error - Session Expired
Problem Statement
How do I set up Chargebee sign-in via SSO? I authenticate customers on my app and want to redirect them to the Chargebee portal without a separate login.
Solution
Use Single Sign-On (SSO) via API so customers authenticated on your site can access the Chargebee portal without logging in again. Chargebee's API creates a portal session and returns an access URL you redirect the customer to.
Note
SSO applies when you use your own authentication. The portal link is valid for one-time use. See Session validity time for portal links.
Steps to Set It Up
- Enable Customers can access the self-serve portal via Single Sign-On API under Configure Chargebee > Settings > Checkout & Self-serve portal > Checkout > Publish
- Add a link on your site for authenticated customers to open the portal
- In your server code, call the Create a portal session API
- Redirect the customer to the
access_urlfrom the API response
Note
The access URL must be used within one hour. After that, the session is valid until the user logs out or your app calls the logout API. Create a new portal session each time you need to give portal access.
Note
Chargebee also supports SSO via SAML.
Related Articles
Show more
Was this article helpful?