mirror of
https://github.com/floci-io/floci.git
synced 2026-12-04 18:48:00 -05:00
GET /oauth2/authorize with identity_provider=COGNITO, or none, now signs in the pool's own users through managed login instead of requiring a federated provider. It redirects to a plain sign-in form at /cognito-idp/login (/login on a custom domain), which checks the password as USER_PASSWORD_AUTH does, sets a pool-scoped `cognito` session cookie and redirects to the callback with code and state. A browser with a live session skips the form. /oauth2/token enforces PKCE (S256 only, as on AWS) when the authorization request sent a code_challenge, for managed login and federated sign-in alike, and refuses a code_verifier for a code issued without one (RFC 9700). The ID token carries the request's nonce. /cognito-idp/logout (/logout on a custom domain) ends the session and redirects to a registered LogoutURL, or back to the sign-in form for the redirect_uri form of the request. Discovery advertises code_challenge_methods_supported. Closes #4218