OAuth / social login
Social login and OAuth account connection for umbral, layered on umbral-auth. Sign in with Google or GitHub, with provider tokens encrypted at rest.
OAuth / social login
umbral-oauth adds social login ("Sign in with Google") and account connection ("Connect GitHub") on top of umbral-auth. A social identity is a SocialAccount row linked to an AuthUser by foreign key - an extension of the user, never a replacement for the username - and provider tokens are stored in Masked columns, encrypted at rest.
rust
use umbral::prelude::*;use umbral_oauth::OAuthPlugin; // Reads oauth_redirect_base + per-provider credentials from Settings// (UMBRAL_OAUTH_* env vars); an unconfigured provider is simply skipped.App::builder() .plugin(OAuthPlugin::from_settings(&settings).login_redirect("/dashboard")) .build()?;Info
This page is the plugin overview. For the full flow - provider environment variables, the login / connect / callback routes, linking several accounts to one user, and the templates - see the complete guide: OAuth / social login.
Install
bash
cargo add umbral-oauthSee also
- OAuth / social login - full guide
- Users and passwords
- Masked columns - how provider tokens are encrypted at rest.
oauthsocial-logingooglegithubauthplugin