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_idfrom the path, loads the matching row from the configured connection resource (scoped by the current Ash tenant), populates the strategy struct with the row'sbase_url,client_id, andclient_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
@spec callback(Plug.Conn.t(), AshAuthentication.Strategy.DynamicOidc.t()) :: Plug.Conn.t()
Handle the IdP redirect back to our app after the user authenticated.
@spec request(Plug.Conn.t(), AshAuthentication.Strategy.DynamicOidc.t()) :: Plug.Conn.t()
Initiate sign-in for the connection identified in the request path.