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

[Amplify JS Admin Actions] Correctly passing Auth header and query string parameters #7234

Merged
merged 4 commits into from May 14, 2024

Conversation

muvashi
Copy link
Contributor

@muvashi muvashi commented Apr 17, 2024

Description of changes:

Two changes are done in this PR.

  1. Correctly passing access token :-

Previous :- Authorization: ${(await fetchAuthSession()).tokens.accessToken.payload}
This is not working as expected and giving CORS error in the browser.

Updated to :- Authorization: ${(await fetchAuthSession()).tokens.accessToken}
Working fine.

  1. Correctly passing query string parameters :-

Previous :- queryStringParameters
It is not giving any error but parameters are neither visible in the request URL nor in the Lambda function.

updated to :- queryParams
Working as expected.

Related GitHub issue #, if available: NA

Instructions

If this PR should not be merged upon approval for any reason, please submit as a DRAFT

Which product(s) are affected by this PR (if applicable)?

  • amplify-cli
  • amplify-ui
  • amplify-studio
  • amplify-hosting
  • [ Y] amplify-libraries

Which platform(s) are affected by this PR (if applicable)?

  • [ Y] JS
  • Swift
  • Android
  • Flutter
  • React Native

Please add the product(s)/platform(s) affected to the PR title

Checks

  • [Y ] Does this PR conform to the styleguide?

  • [ N] Does this PR include filetypes other than markdown or images? Please add or update unit tests accordingly.

  • [N ] Are any files being deleted with this PR? If so, have the needed redirects been created?

  • [ Y] Are all links in MDX files using the MDX link syntax rather than HTML link syntax?

    ref: MDX: [link](https://docs.amplify.aws/)
    HTML: <a href="https://docs.amplify.aws/">link</a>

When this PR is ready to merge, please check the box below

  • [ Y] Ready to merge

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

josefaidt
josefaidt previously approved these changes Apr 17, 2024
@reesscot
Copy link
Contributor

reesscot commented May 3, 2024

@muvashi Can you please rebase this PR against the latest version of main branch? We released a new version of the docs site, so main has changed pretty significantly.

auto-merge was automatically disabled May 10, 2024 18:53

Head branch was pushed to by a user without write access

@muvashi muvashi closed this May 10, 2024
auto-merge was automatically disabled May 10, 2024 18:53

Pull request was closed

@muvashi
Copy link
Contributor Author

muvashi commented May 10, 2024

This PR is updated. Requesting team to please review and merge.

@muvashi muvashi reopened this May 10, 2024
@reesscot reesscot merged commit 99f3e9a into aws-amplify:main May 14, 2024
9 of 10 checks passed
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.

None yet

3 participants