image
Akan.js
English
DocsConventionsReferencesCheatsheet
image
Akan.js
DocsConventionsReferencesCheatsheet
Released under the MIT License
Official Akan.js Consulting onAkansoft
Copyright © 2026 Akan.js All rights reserved.
System managed bybassman
General
• Authorization
• Schema Design
• Edge Computing
• File Management
• Single Sign-On
• DataList & Enum
Interface
• CRUD
• Endpoint
• Form
Observability
• Logging
• Dependency Injection
• Error Handling
• Metrics
Performance
• Caching
• Image Optimization
• Lazy Loading
• Querying
• Queueing
• Realtime
Development
• Documentation
• Script
• Docker
• Kubernetes
General
• Authorization
• Schema Design
• Edge Computing
• File Management
• Single Sign-On
• DataList & Enum
Interface
• CRUD
• Endpoint
• Form
Observability
• Logging
• Dependency Injection
• Error Handling
• Metrics
Performance
• Caching
• Image Optimization
• Lazy Loading
• Querying
• Queueing
• Realtime
Development
• Documentation
• Script
• Docker
• Kubernetes
Next
Authorization

Single Sign-On

SSO lets users sign in with services like GitHub, Google, Kakao, or Naver. In Akan, you usually only write the callback once and let the service decide whether to sign in or continue signup.
  1. User clicks a social login button.
  2. The provider confirms who the user is.
  3. Akan callback receives the profile.
  4. The service signs in or redirects to signup.

Register Providers

First, register the providers your app supports. Each provider needs credentials from that service's developer console.
Example options

Write A Callback

The callback should stay small. Take the provider profile, find the account id, and pass it to your user service.
`SSO.Google` is a guard. It checks that Google SSO is configured before the login start route or callback runs. The start route redirects to Google, and the callback exchanges Google's `code` for a profile.
Small callback

Account Id

Different providers call the user's identity by different names. Normalize it into one `accountId` before calling your service.
  • GitHub often uses `username`.
  • Google often uses the first email address.
  • Kakao and Naver commonly use `email`.
Normalize provider profile

Redirects

After the callback, the service usually chooses one of three places to go.
  • Existing user: go to the signed-in page.
  • New user: go to the signup continuation page.
  • Error: go to an error page with a clear message.

Tips

  • Keep provider-specific code inside the callback. Keep sign-in rules inside the service.
  • Use the same service method after every provider normalizes `accountId`.
  • Always prepare success, signup, and error redirects before starting SSO.
Single Sign-On
Register Providers
Write A Callback
Account Id
Redirects
Tips