-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[v6] Intercept authentication Cognito requests with custom headers #13197
Comments
Hello, @Abdulmalick-Dimnang 👋. I've marked this as a feature request and it appears to have some aspects of version parity from v4 to v6 as you found. Let me review this with the team internally, and I'll follow up with any questions from here. |
@Abdulmalick-Dimnang, are you able to share some more details on how you were achieving this in v4 with Amplify? I don't see where we documented this anywhere in the v4 or v5 code base. |
hi @cwomack we had to patch "@aws-amplify+auth+4.6.6.patch" as follows
and "amazon-cognito-identity-js+5.2.10.patch"
|
apologies for now clearing it up, even with v4 it's not possible unless we have to patch it 🙏 |
Related to #12308 |
@cwomack just to follow up, this update might not be in the near road map? |
We also have this issue |
@Abdulmalick-Dimnang and @yonatanganot (as well as anyone else following this issue), wanted to provide a quick response here and let you know we haven't forgotten about this. While there are no updates for this feature request at this point, it's still on our radar. If there's any progress to report, I'll follow up with a comment as soon as possible! Appreciate your patience. |
Hello @cwomack May I please know if there is any workarounds for this since it is supported in aws-sdk but not in amplify? Thanks |
@ThisisBada, the only way to implement a workaround is to patch the Right now we don't have an ETA on a fix, but we'll update this issue once we have progress to communicate. |
Is this related to a new or existing framework?
React Native
Is this related to a new or existing API?
Authentication
Is this related to another service?
No response
Describe the feature you'd like to request
Feature: Able to intercept authentication Cognito requests such as (signIn, signUp, signOut etc..) with custom headers
We know there's an option to intercept REST & GraphQL but we're looking forward to intercept Authentication requests. We believe we have searched the documentation but sadly it's not possible atm with V6
Our current use case is intercept custom headers to be able to send app check and WAF tokens to be able to validated in AWS cloudfront and we're migrating aws-amplify from V4 to V6 and we were able to intercept requests headers with v4 upon patching as follows with add "headersInterceptor" as a property to intercept with
For example, "signOut" authentication will run as follows
If there's a possible solution we would appreciate if someone can share it 🙏🏼
Describe the solution you'd like
It would be great to intercept authentication Cognito requests with custom headers while init Amplify as follows where "headers" would be an option to add your own custom headers
Describe alternatives you've considered
We haven't searched for any alternative except for keep using amplify v4 since we managed to patch aws-amplify & amazon-cognito-identity-js but we're looking for a clean solution where this option can be provided out of the box
Additional context
No response
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: