Desktop SSO Integration
To integrate the Skillmine Auth login page into a desktop application, you can use either of the following authentication flows:
Browser-Based Authorization Flow
Device Authorization Flow
Each flow requires setting up your client in the Skillmine Auth admin portal first.
π οΈ Prerequisites
Before starting integration:
Go to the Skillmine Auth Admin Portal.
Create the Client Settings and Blueprint Configuration using the below documentation:
π Blueprint Settings
π Client Settings
Note down the generated
client_id,client_secret(if applicable), and thebaseurlof your auth instance.
π Option 1: Browser-Based Authorization Flow
In this method, your desktop app opens the Skillmine Auth login page in the user's default browser and handles the authentication callback.
π Step 1: Generate Authorization URL
Build an authorization URL using the following structure:
π Replace placeholders:
client_id: From Skillmine Auth admin portalredirect_uri: URL your app listens to for the redirect (can be a custom scheme likemyapp://callbackfor native apps)
π₯οΈ Step 2: Open in Browser
When your desktop app launches and no session is active:
Open the authorization URL in the user's browser.
After successful login, the user will be redirected to your appβs redirect URI with either an
access_tokenor an authorizationcode.
π Step 3: Token Handling
If you use
response_type=code, exchange the code for a token by calling the Token API.If you use
response_type=token, the token will be returned directly in the redirect URL.
π Step 4: Session Maintenance
Periodically call the Introspection API to check token validity.
On logout, call the Logout API to properly terminate the session.
π Well-Known Endpoint
Fetch available endpoints (token URL, logout URL, etc.):
This JSON provides all the necessary URLs for token exchange, introspection, and logout.
π₯οΈ Option 2: Device Authorization Flow
This flow is ideal for native desktop apps without embedded browsers or with limited input capabilities.
π² Step 1: Request Device Code
Call the Device Authorization Endpoint with your client_id and required scope. The response will look like:
π» Step 2: Display Info to User
Show the following to the user:
A link to open (
verification_uri_complete)A
user_codethey may need to enter
The user will open the link in a browser, log in via Skillmine Auth, and enter the code if required.
π Step 3: Poll for Status
In the background, your app must poll the Verification Status Endpoint:
POST {{baseurl}}/device/code/verification
Body:
Poll at intervals specified in the response (interval: 5 seconds).
Possible Responses
While Waiting:
On Success:
β
Step 4: Proceed to Dashboard
Once authentication is successful, your app can redirect the user to the main dashboard or start using the token.
Sample : Desktop SSO Integration with Electron using Skillmine Auth
This guide explains how to implement Single Sign-On (SSO) in an Electron-based desktop application using Skillmine Auth, with token-based authentication and user info retrieval.
π§± Prerequisites
Access to Skillmine Auth Admin Portal
Valid
client_idandredirect_uriNode.js v14+ and Electron installed
Install dependencies
βοΈ Step 1: Configure Skillmine Auth
β Client Settings
Create a new client in the Skillmine Auth admin panel:
Allowed Grant Types:
authorization_code,implicitRedirect URI:
http://localhost:3000/callbackScopes:
openid profile user_info_allResponse Types:
token(orcode)
π Docs: Client Settings
π Step 2: Sample Electron Code
1. main.js (Electron main process)
2. preload.js (Exposes IPC)
3. index.html (Renderer process UI)
Step 3 : Execution
β
Summary Flow
Last updated