Skip to main content

Module social

Module social 

Source
Expand description

Social login providers (GitHub, Google).

Endpoint URLs come from crate::providers::endpoints — the single source of truth shared with the mail provider presets.

Structs§

SocialProviderConfig
Configuration for a social login provider.
SocialUserInfo
User information returned by a social login provider.

Enums§

SocialError
Errors for social login operations.
SocialProvider
Supported social login providers.

Functions§

build_authorize_url
Build the authorization redirect URL with CSRF state.
exchange_code
Exchange an authorization code for an access token.
fetch_user_info
Fetch user profile info from the provider.
sanitize_username
Sanitize a username from a provider: alphanumeric + underscore, 3-30 chars. Falls back to user_{random} if too short after sanitization.