AshAuthentication.Strategy.DynamicOidc.Plug (ash_authentication v5.0.0-rc.9)

Copy Markdown View Source

Handlers for dynamic_oidc HTTP requests.

Wraps the standard OAuth2 plug logic with a connection lookup step:

  • Request: extracts :connection_id from the path, loads the matching row from the configured connection resource (scoped by the current Ash tenant), populates the strategy struct with the row's base_url, client_id, and client_secret, and stores the connection id in session alongside Assent's CSRF state.
  • Callback: reads the connection id back from session, loads the row again, populates the strategy, and runs the standard callback flow.

Summary

Functions

Handle the IdP redirect back to our app after the user authenticated.

Initiate sign-in for the connection identified in the request path.

Functions

callback(conn, strategy)

Handle the IdP redirect back to our app after the user authenticated.

request(conn, strategy)

Initiate sign-in for the connection identified in the request path.