beginLogin

suspend fun beginLogin(handleOrDid: String): String

Starts the OAuth login flow.

  1. Resolves the handle/DID to an authorization server via the AT Protocol discovery chain.

  2. Generates PKCE verifier + challenge (S256).

  3. Generates a fresh DPoP EC P-256 keypair.

  4. Pushes a PAR request (handling the expected use_dpop_nonce 401 → retry cycle transparently).

  5. Returns the authorization URL to open in a browser.

Return

The authorization URL to open in a Custom Tab or system browser.

Parameters

handleOrDid

The user's handle (e.g. "alice.bsky.social") or DID.