High Level Overview
Rollfi supports a streamlined single sign-on flow for embedded partners that want to move a signed-in user from their product into Rollfi without a separate username, password, or two-factor step. In the SSO model, your application authenticates to Rollfi, requests a login link for a known user, and Rollfi returns a short-lived redirect URL that contains a signed JWT.For more in depth information and examples, please refer to the Rollfi SSO API reference.
How The Flow Works
- Your application signs the user in on your side.
- Your backend calls Rollfi using Basic authentication with your
clientIdandclientSecret. - Your backend sends the user context needed for login.
- Rollfi validates the request and confirms the user is allowed to access the requested company.
- Rollfi creates a short-lived JWT and appends it to a Rollfi login URL.
- Your application redirects the user to that URL.
- Use the
loginUrlto redirect the user into Rollfi. The JWT is validated and the user is logged in automatically.
What Rollfi Puts In The JWT
Rollfi creates the login JWT with these core attributes:companyIdemailiatexproleswhen roles are suppliednbfwhen clock tolerance is applied
RS256 using a Rollfi-managed private key.
Example Request
Example Response
Security Model
The current flow uses two layers of protection:- API authentication between your backend and Rollfi using your
clientIdandclientSecret - JWT signing by Rollfi using
RS256so the final login URL cannot be tampered with
When To Use The SSO Model
The current Rollfi-signed redirect flow is a strong fit when:- You want the simplest partner implementation
- You want to redirect users from your application without having to worry about the friction of logging them in, or handling authentication
