mix sigra.gen.oauth (Sigra v1.20.0)

Copy Markdown View Source

Generates OAuth support for Sigra authentication.

Creates UserIdentity schema, Vault, encrypted type, migration, OAuth controller, HTML templates, settings page, email templates, test helpers, and injects routes and config.

Usage

mix sigra.gen.oauth

Options

  • --providers - Comma-separated list of providers to configure (e.g., --providers google,github)
  • --live / --no-live - Generate LiveView settings page (default: false)
  • --no-vault - Skip Vault and Encrypted.Binary generation (use if already created by another generator)

Requirements

Requires cloak_ecto in your dependencies:

{:cloak_ecto, "~> 1.3"}

Examples

mix sigra.gen.oauth
mix sigra.gen.oauth --providers google,github
mix sigra.gen.oauth --live
mix sigra.gen.oauth --no-vault