How To Use Angular Interceptor With Firebase Authentication #745
Answered
by
ewwwgiddings
ewwwgiddings
asked this question in
Q&A
-
Does anyone have a good example of how to use an interceptor to add the Firebase token to an HTTP request? Problems I'm facing:
Has anyone found a good solution to this? |
Beta Was this translation helpful? Give feedback.
Answered by
ewwwgiddings
Oct 25, 2024
Replies: 1 comment
-
Found a solution. I've decided to use this library: With my
And registration as:
Seems like it will get the token locally on each request unless it needs refreshing. If anyone else has any better way to do it I'm all ears. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ewwwgiddings
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found a solution. I've decided to use this library:
https://www.npmjs.com/package/@auth0/angular-jwt
With my
tokenGetter
as:And registration as:
Seems like it will get the token locally on each request unless it needs refreshing.
If anyone else has any better way to do it I'm all ears.