mix ash_authentication.add_strategy.oauth2
(ash_authentication v5.0.0-rc.5)
Copy Markdown
View Source
Adds a generic OAuth2 authentication strategy to your user resource
Unlike OIDC, generic OAuth2 does not auto-discover provider endpoints. You can provide the URLs via CLI flags (set as literals in the DSL) or leave them to be configured via environment variables.
Example
mix ash_authentication.add_strategy oauth2 my_provider
Options
--user,-u- The user resource. Defaults toYourApp.Accounts.User--accounts,-a- The accounts domain. Defaults toYourApp.Accounts--identity-field,-i- The field used to identify the user. Defaults toemail--base-url- Base URL of the OAuth2 provider--authorize-url- Authorization endpoint URL (relative to base_url or absolute)--token-url- Token endpoint URL (relative to base_url or absolute)--user-url- User info endpoint URL (relative to base_url or absolute)
Summary
Functions
Callback implementation for Igniter.Mix.Task.igniter/1.
Functions
Callback implementation for Igniter.Mix.Task.igniter/1.