Skip to main content

Module auth_api

Module auth_api 

Source
Expand description

Authentication API - User registration, login, email verification, and Google OAuth

Structs§

AuthResponse
AuthState
Claims
GoogleCallbackQuery
GoogleInitRequest
GoogleOAuthPending
Holds the Google OAuth client credentials and a map of in-flight auth states. Map key = state param; value = (redirect_uri, Option).
GoogleOAuthResult
GoogleStatusQuery
LoginRequest
MeRequest
SignupRequest
UserResponse
VerifyEmailRequest

Functions§

get_current_user
google_callback
GET /auth/google/callback?code=&state=&error= This endpoint is hit by the system browser after Google redirects back. Returns an HTML page (shown in the system browser, not the Tauri WebView).
google_init
POST /auth/google/init Body: { “port”: 8000 } Returns: { “auth_url”: “https://accounts.google.com/…”, “state”: “hex-string” }
google_status
GET /auth/google/status?state= Returns { “pending”: true } while waiting, or full auth result when done.
login
signup
verify_email