# `AshAuthentication.Phoenix.Oauth2Server.ConsentRouter`
[🔗](https://github.com/team-alembic/ash_authentication_oauth2_server/blob/v0.1.0/lib/ash_authentication_phoenix/oauth2_server/consent_router.ex#L5)

Plug router for the human-driven consent step of the OAuth 2.1 flow.

Handles `GET /authorize` (renders the consent screen) and
`POST /authorize` (records the consent decision and redirects with a code).
Both require a logged-in browser session — mount this behind your
browser/session pipeline, not your API pipeline.

See `AshAuthentication.Phoenix.Oauth2Server.ProtocolRouter` for the
client-facing protocol endpoints (token, register, metadata).

## Options

  * `:oauth2_server` (required) — the user's `Oauth2Server` config module
  * `:consent_view` — module exposing `render(:consent, assigns)`
    (default: `AshAuthentication.Phoenix.Oauth2Server.ConsentView`)

# `call`

# `init`

---

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