Create portal session on behalf of user

Hi,

Is there a way to create a portal session on behalf of the user? We would like to give our user access to the portal. They are already authenticated on our SaaS. I find it cumbersome to force our user to create another account just to access the ERPNext portal (support, invoice, …)

Stripe has a similar feature [1] where you call (backend / server side) their API with the user ID you want to login to the portal, then you get a token and the user (frontend) to access the stripe portal.

[1] https://stripe.com/docs/api/customer_portal/sessions/create

Best regards,

Sam

You can set-up SSO using OAuth.
Ref: https://frappeframework.com/docs/v13/user/en/guides/integration/how_to_set_up_oauth