Skip to content
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

fix: create valid unauthorized request for odic/userpool connections #93

Merged
merged 1 commit into from
Jul 8, 2022

Conversation

lawmicha
Copy link
Contributor

@lawmicha lawmicha commented Jul 8, 2022

Issue #, if available:

Description of changes:
This PR is part of the efforts to propagate the unauthorized error back to the caller. In the previous PR #69 we are sure that it works for invalid API keys. When testing with endpoint with user pool auth mode, it would fail with a bad request.

The reason for the bad request is because retrieving the token failed, so the request was not modified before attempting the connection. AppSync will return a bad request indicating that the logic for creating the request was invalid.

This PR is to ensure even when the user is not signed in, the library will create a valid request, which then gets validated by AppSync as Unauthorized.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@lawmicha lawmicha requested a review from a team as a code owner July 8, 2022 16:25
@lawmicha lawmicha force-pushed the fix/userpool-unauthorized branch from 59053f0 to c7e4713 Compare July 8, 2022 16:26
@lawmicha lawmicha merged commit 254b0d0 into main Jul 8, 2022
@lawmicha lawmicha deleted the fix/userpool-unauthorized branch July 8, 2022 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants