# `mix sigra.gen.oauth`
[🔗](https://github.com/sztheory/sigra/blob/v1.20.0/lib/mix/tasks/sigra.gen.oauth.ex#L1)

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
