View Source Ueberauth.Strategy.Okta (Ueberauth Okta v1.1.3)

Provides an Ueberauth strategy for authenticating with Okta.

Setup

Include the provider in your configuration for Ueberauth with any applicable configuration options (Okta and OAuth2 options are supported):

config :ueberauth, Ueberauth,
providers: [
  okta: {Ueberauth.Strategy.Okta, [client_id: "12345"]}
]

Note: Provider options are evaluated at compile time by default (see Plug) so if you use runtime.exs or another mechanism to load options into the Application environment, you'll want to use the Ueberauth.Strategy.Okta.OAuth scope. See Ueberauth.Strategy.Okta.OAuth module doc for more details.

Okta Options

  • :oauth2_module - OAuth module to use (default: Ueberauth.Strategy.Okta.OAuth)
  • :oauth2_params - query parameters for the oauth request. See Okta OAuth2 documentation for list of parameters. Note that not all parameters are compatible with this flow. (default: [scope: "openid email profile"])
  • :uid_field - default: :sub

Summary

Functions

Includes the credentials from the Okta response.

Stores the raw information (including the token) obtained from the Okta callback.

Cleans up the private area of the connection used for passing the raw Okta response around during the callback.

Handles the initial redirect to the okta authentication page.

Fetches the fields to populate the info section of the Ueberauth.Auth struct.

Fetches the uid field from the Okta response. This defaults to the option uid_field which in-turn defaults to sub

Functions

Includes the credentials from the Okta response.

Callback implementation for Ueberauth.Strategy.default_options/0.

Stores the raw information (including the token) obtained from the Okta callback.

Cleans up the private area of the connection used for passing the raw Okta response around during the callback.

Handles the initial redirect to the okta authentication page.

Supports state and redirect_uri params which are required for Okta /authorize request. These will also be generated if omitted. redirect_uri from the strategy config will take precedence over value provided here

Fetches the fields to populate the info section of the Ueberauth.Auth struct.

Fetches the uid field from the Okta response. This defaults to the option uid_field which in-turn defaults to sub