Repository navigation
feat(auth-doctor): warn when an app won't send identity_provider with prompt - #176
Merged
Merged
Conversation
… prompt Managed login forwards prompt=select_account to Google only when the authorize request also names the IdP (probe client, #174). The doctor always sent identity_provider, so an app that only sends prompt still passed. Warn when an app aliases auth variables (auth.env) but not COGNITO_IDENTITY_PROVIDER, and say why in the authorize warning and docstring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Terraform Plan✅ No changes — infrastructure is up to date. Plan output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The probe client (#174) showed that Cognito managed login forwards
prompt=select_accountto Google only when the request also sendsidentity_provider.auth-doctor.pyalways addsidentity_provider, so an app that sends onlypromptpassed but would get no account chooser after the Google cutover (#175).What
choosercheck (WARN only): an app that renames auth variables viaauth.envbut doesn't aliasCOGNITO_IDENTITY_PROVIDERalmost certainly doesn't send it. Apps that read the platform variables directly aren't flagged, since the doctor can't see their code.identity_providerrequirement.How verified
python3 -m unittest discover -s scripts/tests: 133 tests, OK. There are 4 new tests: aliased without IdP warns, aliased with IdP passes, no aliases passes, and the probe names the IdP.python3 -m unittest discover -s terraform/lambda-src/tests: 219 tests, OK.app.yamlon main getsWARN chooser.app.yamlfrom feat(auth): ask Google for the account chooser at sign-in frosting#258, which aliasesCOGNITO_IDENTITY_PROVIDER, passes with no warning.Rollout
Script only, with no Terraform changes. App deploys pick it up from platform
main.🤖 Generated with Claude Code