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

Unable to use the Angular http interceptor when using aws-amplify #12738

Closed
2 tasks
brianreinhold opened this issue Dec 21, 2023 · 4 comments
Closed
2 tasks
Assignees
Labels
Angular Related to Angular 2+ question General question

Comments

@brianreinhold
Copy link

Is this related to a new or existing framework?

Angular

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

I want to be able to intercept the http requests being sent out by my client app (mainly to see that there are correct). If I send my own http request using the Angular HttpClient, I can see the request in the interceptor. But when I send an aws-amplify method like 'signIn()' I do not. I do not know what goes on under the hood when I call that method.

If there IS a way to trap these requests I would like to know how to do it or point me to some documentation that explains how it can be done.

Describe the solution you'd like

The ability to trap aws-amplify http requests in the Angular Http Interceptor (Angular 17)

Describe alternatives you've considered

I do not know of any.

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change
@brianreinhold brianreinhold added the pending-triage Issue is pending triage label Dec 21, 2023
@cwomack cwomack added the Angular Related to Angular 2+ label Dec 21, 2023
@cwomack cwomack self-assigned this Dec 21, 2023
@cwomack
Copy link
Member

cwomack commented Dec 22, 2023

Hello, @brianreinhold and thanks for opening this issue. There was a similar feature request opened a while back with some good workarounds suggested here. Can you take a look at that and see if it will suffice for what you're looking to do?

@cwomack cwomack added question General question pending-response and removed pending-triage Issue is pending triage labels Dec 22, 2023
@brianreinhold
Copy link
Author

I stumbled upon axios later in my searches (I think in a StackOverflow). I could use that. It would be more convenient to use just one http interceptor but that's a twist of laziness. Once I get authenticated through Cognito all the http requests I make are my own apis and thus use the HttpClient.

@cwomack
Copy link
Member

cwomack commented Jan 9, 2024

@brianreinhold, could you potentially clarify the use case and implementation that you're looking for here? We don't have axios in v6 of Amplify (latest major version), but want to make sure there's not a feature that we're missing here. Thanks!

@cwomack
Copy link
Member

cwomack commented Jan 25, 2024

Closing this issue as we have not heard back from you. We don't intend on implementing axios again for http interceptors due to our goals on reducing complexity in the latest version of Amplify as well as trying to remove our dependencies on third parties. Feel free to reply back and provide any additional context that we missed and we can re-open the issue if needed.

Thank you!

@cwomack cwomack closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Angular Related to Angular 2+ question General question
Projects
None yet
Development

No branches or pull requests

2 participants