Aller au contenu principal

Common Use Cases

Explore how SyAuth adapts to different application architectures and business needs.


🚀 B2C Applications

Consumer-facing apps focused on easy onboarding.

Goal

Maximize conversion with social login and passwordless entry while securing user data.

Solution

  • Authentication: Social Login (Google, Facebook) + Email/Password
  • User Management: Self-service registration & profile management
  • Security: Email verification required for sensitive actions

Implementation

  1. Enable Social Providers
  2. Use Universal Login for a branded experience
  3. Implement Email Verification

🏢 B2B SaaS Platforms

Business applications requiring multi-tenancy and organization management.

Goal

Isolate data between customers (tenants) and manage team access.

Solution

  • Workspaces: Each customer gets a dedicated Workspace
  • Roles & Permissions: Use Groups for RBAC (Admin, Editor, Viewer)
  • SSO: Allow enterprises to bring their own identity provider (Coming Soon)

Implementation

  1. Create a Workspace for each customer creation
  2. Assign users to specific Groups within the workspace
  3. Use the SDK to check permissions: if (user.groups.includes('admin')) { ... }

🤖 Machine-to-Machine (M2M)

Backend services communicating without user interaction.

Goal

Secure communication between microservices, daemons, and cron jobs.

Solution

  • Grant Type: Client Credentials Grant
  • Identity: Services authenticate as themselves using client_id + client_secret
  • Security: Short-lived access tokens, no refresh tokens

Implementation

  1. Create a "Machine-to-Machine" OAuth Client in Dashboard
  2. Follow the M2M Integration Guide
  3. Validate tokens in your API using the public key

🔄 Legacy Migration

Moving from an existing database to SyAuth.

Goal

Modernize authentication without forcing users to reset passwords.

Solution

  • Custom Database: Connect SyAuth to your existing SQL/NoSQL database
  • Lazy Migration: Authenticate against legacy DB, then migrate user to SyAuth on successful login

Implementation

  1. Set up a Custom Database Connection
  2. Write the "Login" script to verify legacy hashes
  3. Turn on "Import to SyAuth" (Lazy Migration)

📱 Mobile Applications

Native iOS and Android apps.

Goal

Secure native authentication with optimal user experience.

Solution

  • Flow: Authorization Code Flow with PKCE (Proof Key for Code Exchange)
  • Session: Long-lived Refresh Tokens with rotation
  • Biometrics: Can be implemented on top of the access token

Implementation

  1. Use a native SDK or AppAuth library
  2. Configure a native callback scheme (e.g., com.myapp://callback)
  3. Follow the Mobile/Native Best Practices