-
Notifications
You must be signed in to change notification settings - Fork 2k
Add callbackUrls to aws cognito userpool client args #6272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Add callbackUrls to aws cognito userpool client args #6272
Conversation
vimtor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the contribution @dimitor115
problem now is that if the user skips callbackUrls you get:
| Error Web sst:aws:CognitoUserPoolClient → WebClient aws:cognito:UserPoolClient
creating Cognito User Pool Client (Web): operation error Cognito Identity Provider: CreateUserPoolClient, https response error StatusCode: 400, RequestID: d56889f8-e70d-4983-a441-97ce613d900e, InvalidOAuthFlowException: CallbackUrls can not be empty when code flow or implicit flow is selected
i proposed a change to keep it compatible with existing defaults, but yeah that https://example.com looks suspicious
maybe callbackUrls should just be required?
|
Personally I believe it should be required, but as far as I see it's not required in Pulumi as well. This makes me think, let's keep it backward compatible and fallback to example.com |
Co-authored-by: Victor Navarro <vn4varro@gmail.com>
Co-authored-by: Victor Navarro <vn4varro@gmail.com>
Co-authored-by: Victor Navarro <vn4varro@gmail.com>
vimtor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

Hi all, while implementing an AWS User Pool in AWS Cognito I ran into a small inconvenience with the
addClientmethod. AFAIK, thecallbackUrlis required for the managed login flow to redirect back to your app, but it isn’t exposed as an input parameter, so you currently have to rely on a smalltransformworkaround:My current code:
While I believe it's quite convenient requirement, so it could look like this:
Please let me know if that makes sense for you to expose it.