AshAuthentication.Strategy.Okta (ash_authentication v5.0.0-rc.6)

Copy Markdown View Source

Strategy for authenticating using Okta.

This strategy builds on-top of AshAuthentication.Strategy.Oidc and assent, and uses Okta's OpenID Connect discovery endpoint to retrieve token, authorization, and user info URLs.

In order to use Okta you need to provide the following minimum configuration:

  • client_id
  • client_secret
  • redirect_uri
  • base_url - your Okta authorization server, typically https://YOUR_OKTA_DOMAIN/oauth2/default (the built-in default Custom Authorization Server).

Choosing a base_url

Okta exposes two kinds of authorization servers:

  • Custom Authorization Server (recommended) — issuer https://YOUR_OKTA_DOMAIN/oauth2/{authServerId}. Every Okta org ships with one named default.
  • Org Authorization Server — issuer https://YOUR_OKTA_DOMAIN. Only suitable for a small number of Okta-internal use cases.

If you're not sure, use the default Custom Authorization Server.

More documentation:

Summary

Functions

transform(entity, dsl_state)

Callback implementation for AshAuthentication.Strategy.Custom.transform/2.

verify(strategy, dsl_state)

Callback implementation for AshAuthentication.Strategy.Custom.verify/2.