Module users

Source

Functions§

change_password
Change user password
constant_time_compare 🔒
Constant-time comparison to prevent timing attacks
create_auth_token_and_session 🔒
Helper function to create a JWT token and session
get_current_user
Get the current user’s profile
get_user_profile
Get the current user’s complete profile including meta and PII data
handle_login
Login a user
handle_register
Register a new user
invalidate_user_session
Invalidate a specific session
is_password_valid 🔒
Validate password strength
list_user_sessions
list all sessions for a user
list_users
List all users
logout
Logout the current user
update_profile
Update user profile information
update_user_profile
Update user profile information - handles both PII and meta updates in a single endpoint