Single Sign-On (SSO)
SSO allows you to automatically connect a user to Gyfti from an external application using a JWT token generated via the API.
Automatic Authentication
This method allows an external application to automatically log a user into Gyfti without requiring them to create an account or manually sign in.
The steps:
The application generates a user JWT token using the Gyfti API.
The application redirects the user to Gyfti with this token.
Gyfti automatically authenticates the user.
Get your API Key
Before generating a token, you must retrieve your Gyfti API key.
Log in to your Gyfti account
Go to the Settings page
Copy your API key
⚠️ This key is used to authenticate your API requests. It must remain confidential and should only be used on the server side.
1. Generate a user token
For each user you want to automatically log in, you must first generate a secure JWT token.
Send a POST request to the following endpoint:
Headers
Body
Parameters
User email address
companyName
Name of your company on Gyfti
firstName
User first name
lastName
User last name
Example using cURL
Example response
2. Redirect the user to Gyfti
Once the token is generated, redirect the user to the destinationUrl recived from the previous response:
Example:
3. Automatic authentication
When the user arrives at this URL:
Gyfti verifies the token
The user is automatically created if they do not already exist
The user is logged into their Gyfti workspace
No manual action is required from the user.
Integration flow
💡 Tip
For security reasons:
Generate the token server-side
Never expose your API key in client-side code
Last updated