Back to Home

How SSO Works

Bagaimana SSO Berfungsi

Single Sign-On lets you log in once and access all connected applications securely — no repeated passwords, no friction.

Architecture Overview
Gambaran Seni Bina
User
👤 Browser
→
Login request
SSO Platform
🔐 Auth Server
→
Token + redirect
Your App
💻 System
⇄
Verify token
SSO Platform
✅ Verify API
1
Registration
User registers an account
User fills in their details at /register.php. The account is submitted for admin approval. Until approved, the user cannot sign in.
2
Admin Approval
Admin reviews and approves
Admin logs in at /admin, navigates to Users, and approves or rejects the registration. Approved users gain access to the dashboard.
3
OTP Login
User signs in with OTP
User enters their email at /login.php. A one-time 6-digit code is sent to their email. They enter the code to authenticate — no password needed.
GET /login.php → Enter email → OTP sent to email → Enter OTP → Authenticated
4
Dashboard
User sees available applications
After login, user lands on /dashboard.php showing all active systems they have access to. They can pin favourites, search, and check live status.
5
SSO Token
User launches an application
Clicking Launch triggers /sso-redirect.php. SSO generates a one-time token (valid 5 minutes), stores it, and redirects the user to the app's Redirect URL with the token appended.
https://yourapp.com/sso-callback?sso_token=abc123xyz...
6
Token Verification
Your app verifies the token
Your callback file calls the SSO verify endpoint with the token and your secret key. SSO validates it and returns the user's details. Token is marked used immediately — cannot be reused.
GET /verify-token.php?token=abc123&secret=YOUR_KEY // Response: {"ok": true, "user": {"id": 1, "name": "Ali", "email": "ali@example.com"}}
7
Access Granted
Your app starts its own session
Using the returned user data, your app creates a local session. The user is now logged in to your application without ever entering a password there.
session_start(); $_SESSION['user_id'] = $user['id']; $_SESSION['user_name'] = $user['name']; $_SESSION['user_email'] = $user['email']; header('Location: /dashboard');
Ready to integrate?
Bersedia untuk integrasi?
Register your system in the admin panel and download the auto-generated PHP callback code.
Daftarkan sistem anda di panel admin dan muat turun kod PHP callback yang dijana secara automatik.
Read the Docs → Create Account