Scanning documentation library
Scanning documentation library
Scanning documentation library
Ring Platform Authentication System - Auth.js v5 powered multi-provider authentication with advanced security, role-based access control, and seamless Web3 integration.
Ring Platform implements a sophisticated multi-layer authentication architecture that combines traditional OAuth providers, passwordless magic links, and cutting-edge Web3 wallet authentication with revolutionary PIN security (no seed phrases required).
Traditional OAuth + Google Identity Services (GIS)
Implementation:
Configuration: // auth.config.ts - Google OAuth provider
Native iOS/macOS + Web Integration
Features:
Configuration: // auth.config.ts
Email-Based Secure Authentication
Security Features:
Configuration: // auth.ts - Magic link provider
MetaMask + WalletConnect Integration
Supported Chains:
Wagmi v2 + Viem Stack: // lib/wagmi-config.ts
Web3 Without Seed Phrases
Key Innovation:
Implementation: // features/wallet/services/ensure-wallet.ts
| Role | Level | Access | Use Cases |
|---|---|---|---|
| VISITOR | 0 | Public content, browse entities/opportunities | Unauthenticated users, general public |
| SUBSCRIBER | 1 | Create opportunities, basic messaging, view profiles | Free registered users |
| MEMBER | 2 | Create entities, vendor features, NFT marketplace | Paid tier ($29/month), businesses |
| CONFIDENTIAL | 3 | Access confidential entities/opportunities, enhanced features | Verified organizations, trusted partners |
| ADMIN | 4 | Full system access, user management, analytics | Platform administrators |
// features/auth/services/upgrade-user-role.ts
export async function upgradeUserRole(
userId: string,
newRole: UserRole,
paymentReference?: string
): Promise<void> {
// Validate role hierarchy
const currentRole = await getUserRole(userId)
if (getRoleLevel(newRole) <= getRoleLevel(currentRole)) {
throw new Error('Cannot downgrade or lateral move')
}
// Update user role
await db.update('users', userId, { role: newRole })
// Audit log
await createAuditLog({
userId,
action: 'role_upgrade',
from: currentRole,
to: newRole,
paymentReference,
timestamp: new Date()
})
// Notify user
await sendNotification(userId, {
type: 'role_upgrade',
title: `Upgraded to ${newRole}`,
message: `Your account has been upgraded. New features unlocked!`
})
}// lib/auth-adapter-singleton.ts
Automatic account linking for same email across providers:
Configuration:
Document upload with Vercel Blob storage:
// features/auth/components/kyc-upload.tsx
30-day grace period account deletion:
// Server Component
// Client Component
// hooks/use-auth.ts
| Metric | Value | Industry Standard |
|---|---|---|
| Google OAuth Login | <500ms | 2-3s |
| GIS One Tap Login | <300ms | N/A |
| Magic Link Send | <200ms | 500ms-1s |
| Wallet Connection Success | 95% | 40% |
| Session Creation | <100ms | 200-500ms |
| PIN Setup Completion | 87% | N/A |
| Email Linking Success | 100% | Manual process |
Auth.js Core Google OAuth Apple Sign-In Magic Links WalletConnect Firebase (if using firebase-full mode) Database Backend Mode
For Ringdom. For the Light. For Secure Authentication.
🔐 Perfect authentication. Perfect security. Perfect user experience. 🔥
Ring Platform Authentication System - Auth.js v5 powered multi-provider authentication with advanced security, role-based access control, and seamless Web3 integration.
Ring Platform implements a sophisticated multi-layer authentication architecture that combines traditional OAuth providers, passwordless magic links, and cutting-edge Web3 wallet authentication with revolutionary PIN security (no seed phrases required).
Traditional OAuth + Google Identity Services (GIS)
Implementation:
Configuration: // auth.config.ts - Google OAuth provider
Native iOS/macOS + Web Integration
Features:
Configuration: // auth.config.ts
Email-Based Secure Authentication
Security Features:
Configuration: // auth.ts - Magic link provider
MetaMask + WalletConnect Integration
Supported Chains:
Wagmi v2 + Viem Stack: // lib/wagmi-config.ts
Web3 Without Seed Phrases
Key Innovation:
Implementation: // features/wallet/services/ensure-wallet.ts
| Role | Level | Access | Use Cases |
|---|---|---|---|
| VISITOR | 0 | Public content, browse entities/opportunities | Unauthenticated users, general public |
| SUBSCRIBER | 1 | Create opportunities, basic messaging, view profiles | Free registered users |
| MEMBER | 2 | Create entities, vendor features, NFT marketplace | Paid tier ($29/month), businesses |
| CONFIDENTIAL | 3 | Access confidential entities/opportunities, enhanced features | Verified organizations, trusted partners |
| ADMIN | 4 | Full system access, user management, analytics | Platform administrators |
// features/auth/services/upgrade-user-role.ts
export async function upgradeUserRole(
userId: string,
newRole: UserRole,
paymentReference?: string
): Promise<void> {
// Validate role hierarchy
const currentRole = await getUserRole(userId)
if (getRoleLevel(newRole) <= getRoleLevel(currentRole)) {
throw new Error('Cannot downgrade or lateral move')
}
// Update user role
await db.update('users', userId, { role: newRole })
// Audit log
await createAuditLog({
userId,
action: 'role_upgrade',
from: currentRole,
to: newRole,
paymentReference,
timestamp: new Date()
})
// Notify user
await sendNotification(userId, {
type: 'role_upgrade',
title: `Upgraded to ${newRole}`,
message: `Your account has been upgraded. New features unlocked!`
})
}// lib/auth-adapter-singleton.ts
Automatic account linking for same email across providers:
Configuration:
Document upload with Vercel Blob storage:
// features/auth/components/kyc-upload.tsx
30-day grace period account deletion:
// Server Component
// Client Component
// hooks/use-auth.ts
| Metric | Value | Industry Standard |
|---|---|---|
| Google OAuth Login | <500ms | 2-3s |
| GIS One Tap Login | <300ms | N/A |
| Magic Link Send | <200ms | 500ms-1s |
| Wallet Connection Success | 95% | 40% |
| Session Creation | <100ms | 200-500ms |
| PIN Setup Completion | 87% | N/A |
| Email Linking Success | 100% | Manual process |
Auth.js Core Google OAuth Apple Sign-In Magic Links WalletConnect Firebase (if using firebase-full mode) Database Backend Mode
For Ringdom. For the Light. For Secure Authentication.
🔐 Perfect authentication. Perfect security. Perfect user experience. 🔥
Ring Platform Authentication System - Auth.js v5 powered multi-provider authentication with advanced security, role-based access control, and seamless Web3 integration.
Ring Platform implements a sophisticated multi-layer authentication architecture that combines traditional OAuth providers, passwordless magic links, and cutting-edge Web3 wallet authentication with revolutionary PIN security (no seed phrases required).
Traditional OAuth + Google Identity Services (GIS)
Implementation:
Configuration: // auth.config.ts - Google OAuth provider
Native iOS/macOS + Web Integration
Features:
Configuration: // auth.config.ts
Email-Based Secure Authentication
Security Features:
Configuration: // auth.ts - Magic link provider
MetaMask + WalletConnect Integration
Supported Chains:
Wagmi v2 + Viem Stack: // lib/wagmi-config.ts
Web3 Without Seed Phrases
Key Innovation:
Implementation: // features/wallet/services/ensure-wallet.ts
| Role | Level | Access | Use Cases |
|---|---|---|---|
| VISITOR | 0 | Public content, browse entities/opportunities | Unauthenticated users, general public |
| SUBSCRIBER | 1 | Create opportunities, basic messaging, view profiles | Free registered users |
| MEMBER | 2 | Create entities, vendor features, NFT marketplace | Paid tier ($29/month), businesses |
| CONFIDENTIAL | 3 | Access confidential entities/opportunities, enhanced features | Verified organizations, trusted partners |
| ADMIN | 4 | Full system access, user management, analytics | Platform administrators |
// features/auth/services/upgrade-user-role.ts
export async function upgradeUserRole(
userId: string,
newRole: UserRole,
paymentReference?: string
): Promise<void> {
// Validate role hierarchy
const currentRole = await getUserRole(userId)
if (getRoleLevel(newRole) <= getRoleLevel(currentRole)) {
throw new Error('Cannot downgrade or lateral move')
}
// Update user role
await db.update('users', userId, { role: newRole })
// Audit log
await createAuditLog({
userId,
action: 'role_upgrade',
from: currentRole,
to: newRole,
paymentReference,
timestamp: new Date()
})
// Notify user
await sendNotification(userId, {
type: 'role_upgrade',
title: `Upgraded to ${newRole}`,
message: `Your account has been upgraded. New features unlocked!`
})
}// lib/auth-adapter-singleton.ts
Automatic account linking for same email across providers:
Configuration:
Document upload with Vercel Blob storage:
// features/auth/components/kyc-upload.tsx
30-day grace period account deletion:
// Server Component
// Client Component
// hooks/use-auth.ts
| Metric | Value | Industry Standard |
|---|---|---|
| Google OAuth Login | <500ms | 2-3s |
| GIS One Tap Login | <300ms | N/A |
| Magic Link Send | <200ms | 500ms-1s |
| Wallet Connection Success | 95% | 40% |
| Session Creation | <100ms | 200-500ms |
| PIN Setup Completion | 87% | N/A |
| Email Linking Success | 100% | Manual process |
Auth.js Core Google OAuth Apple Sign-In Magic Links WalletConnect Firebase (if using firebase-full mode) Database Backend Mode
For Ringdom. For the Light. For Secure Authentication.
🔐 Perfect authentication. Perfect security. Perfect user experience. 🔥