User Management
Get User Profile
Get authenticated user profile information
GET
Retrieve the profile information for the currently authenticated user. This endpoint returns user details, metadata, and account status.
This endpoint requires authentication. Include the Bearer token in the Authorization header.
Response
Unique user identifier (UUID)
Audience claim (typically your application identifier)
User role (e.g., “authenticated”, “admin”)
User’s email address
ISO timestamp when email was confirmed (null if not confirmed)
User’s phone number in E.164 format
ISO timestamp when phone was confirmed (null if not confirmed)
ISO timestamp when user account was confirmed
ISO timestamp of last successful sign-in
Application-specific metadata (managed by your application)
User-specific metadata (can be updated by user)
Array of identity providers linked to this user
ISO timestamp when user account was created
ISO timestamp when user account was last updated
Error Responses
Implementation Examples
React User Profile Component
React Hook for User Data
Node.js Backend Handler
Authentication Middleware
User Metadata Structure
App Metadata (Read-only)
App metadata is managed by your application and cannot be modified by users:User Metadata (User-modifiable)
User metadata can be updated by users through the update profile endpoint:Security Considerations
- Token Validation: Always validate JWT tokens server-side
- Scope Limitations: Users can only access their own profile data
- Sensitive Data: Never expose sensitive information in user metadata
- Rate Limiting: Implement rate limiting for profile access
- Audit Logging: Log profile access for security monitoring
Best Practices
Frontend Implementation
Frontend Implementation
- Cache user data appropriately to reduce API calls
- Handle token expiration gracefully with automatic refresh
- Provide loading states for better user experience
- Implement error boundaries for robust error handling
- Use TypeScript for better type safety
Backend Implementation
Backend Implementation
- Validate JWT tokens on every request
- Implement proper error handling and logging
- Use middleware for authentication logic
- Cache user data when appropriate
- Monitor API usage and performance
Data Management
Data Management
- Keep user metadata lean and relevant
- Use app metadata for application-specific data
- Implement data validation for user inputs
- Consider GDPR compliance for user data
- Regular cleanup of unused metadata fields
Testing
Unit Tests
Related Endpoints
Update Profile
Update user profile information
User Logout
Sign out and invalidate tokens
Refresh Token
Refresh expired access tokens
Delete Account
Delete user account permanently