Module pkce

Module pkce 

Source
Expand description

PKCE Authorization Code flow for Cognito desktop login.

Flow:

  1. Generate code_verifier + code_challenge (S256).
  2. Bind a random local TCP port for the redirect_uri.
  3. Open browser to Cognito hosted UI.
  4. Await HTTP callback (code + state).
  5. Exchange code for tokens via /oauth2/token.
  6. Decode email from id_token claims (no re-verification needed โ€” we fetched the token directly from Cognito).

Structsยง

PkceResult

Constantsยง

LOGIN_TIMEOUT_SECS

Functionsยง

extract_jwt_claims ๐Ÿ”’
open_browser ๐Ÿ”’
percent_decode ๐Ÿ”’
percent_encode ๐Ÿ”’
query_param ๐Ÿ”’
refresh_token
run_pkce_login