AshAtproto.Auth.Plug
(ash_atproto v1.0.0)
Copy Markdown
A Plug for the atproto oauth strategy.
Provides routes for the oauth phases of request and callback, along with a client metadata JSON.
Summary
Functions
@spec callback(Plug.Conn.t(), AshAtproto.Auth.t()) :: Plug.Conn.t()
Perform the callback phase of atproto oauth.
Responds to a user being redirected back from the remote authentication provider, and validates the passed options, ultimately registering or signing-in a user if the authentication was successful.
@spec client_metadata(Plug.Conn.t(), AshAtproto.Auth.t()) :: Plug.Conn.t()
@spec request(Plug.Conn.t(), AshAtproto.Auth.t()) :: Plug.Conn.t()
Perform the request phase of atproto oauth.
Builds a redirection URL based on the provider configuration and redirects the user to that endpoint.