Overview
Strike Auth Service provides comprehensive user management capabilities, handling the complete user lifecycle from registration to deletion. The service manages user profiles, authentication credentials, and metadata while ensuring security and compliance.User Lifecycle
1
Registration
Users register with email/phone and password, or through OAuth providers
2
Verification
Email or phone verification confirms user identity
3
Authentication
Users sign in to receive access tokens for API access
4
Profile Management
Users can update their profile information and preferences
5
Account Maintenance
Password changes, email updates, and security settings
6
Deactivation/Deletion
Account suspension or permanent deletion when needed
User Data Structure
Core User Fields
Metadata Types
- App Metadata
- User Metadata
System-managed metadata that applications can read but users cannot modify.
User Roles and Permissions
Default Roles
| Role | Description | Capabilities |
|---|---|---|
authenticated | Standard user | Access to user endpoints |
admin | Administrator | Full system access |
service_role | Service account | Server-to-server operations |
Custom Roles
You can define custom roles in theapp_metadata:
Registration Methods
Email/Password Registration
Traditional registration with email verification:Phone/Password Registration
Registration with SMS verification:OAuth Registration
Registration through external providers:Profile Management
Updating User Information
Users can update their profile information:Changing Email
Email changes require verification:Changing Password
Password changes require current password:Admin User Management
Creating Users (Admin)
Administrators can create users with specific settings:Updating Users (Admin)
Admins can update any user’s information:User Invitations
Send invitations to new users:User States
Account Status
Users can be in various states:- Active: Normal user with full access
- Unconfirmed: Registered but email/phone not verified
- Banned: Temporarily or permanently suspended
- Deleted: Account marked for deletion
Confirmation Status
Track verification status:Security Features
Password Security
- Hashing: Passwords are hashed using bcrypt
- Complexity: Configurable password requirements
- History: Prevent password reuse
- Expiration: Optional password expiration policies
Account Protection
- Rate Limiting: Prevent brute force attacks
- Account Lockout: Temporary lockout after failed attempts
- Audit Logging: Track all user actions
- Session Management: Control active sessions
Data Privacy
- GDPR Compliance: Support for data export and deletion
- Data Minimization: Only collect necessary information
- Encryption: Sensitive data encrypted at rest
- Access Controls: Role-based access to user data
Best Practices
User Registration
User Registration
- Implement email/phone verification
- Use strong password requirements
- Collect minimal required information
- Provide clear privacy policy
Profile Management
Profile Management
- Allow users to control their data
- Implement proper validation
- Provide data export functionality
- Support account deletion
Admin Operations
Admin Operations
- Require admin authentication
- Log all admin actions
- Implement approval workflows
- Use principle of least privilege
Security
Security
- Regular security audits
- Monitor for suspicious activity
- Implement proper session management
- Keep user data encrypted