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
⚠️ 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:
Name of your company on Gyfti
Example using cURL
Example response
The token field is the JWT you will use to log the user in.
2. Redirect the user to Gyfti
Once the token is generated, redirect the user to the following URL:
Example:
3. Automatic authentication
When the user arrives at this URL:
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