atproto_core/oauth/flow
Start an authorization flow as an Effect: resolve the PDS, discover
the authorization server, and push the request (PAR) with PKCE + DPoP.
One-shot inputs (PKCE challenge, state) come in as parameters.
Types
What the kernel resolves before the wrapper folds in its platform key: the authorization redirect URL and the discovered endpoints.
pub type Authorized {
Authorized(
redirect_url: String,
pds: String,
issuer: String,
token_endpoint: String,
)
}
Constructors
-
Authorized( redirect_url: String, pds: String, issuer: String, token_endpoint: String, )
pub type StartError {
ResolveFailed(String)
DiscoverFailed(String)
ParFailed(String)
}
Constructors
-
ResolveFailed(String) -
DiscoverFailed(String) -
ParFailed(String)
Values
pub fn start(
resolver resolver: String,
identifier identifier: String,
client_id client_id: String,
redirect_uri redirect_uri: String,
scope scope: String,
pkce_challenge pkce_challenge: String,
state state: String,
extra_form extra_form: List(#(String, String)),
) -> effect.Effect(Result(Authorized, StartError))