-
Great project first of all so thank you for creating it. I am working with Hasura, which requires JWT token to be included in the headers. How would I do that using next-firebase-auth? Is there a way to access the token on client so I can pass it to Apollo Client? Hasura also requires custom claims but that I can solve by using Hasura's claims_map. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @ZouTiger , I believe this is the example that you are looking for: https://github.com/gladly-team/next-firebase-auth/blob/main/example/pages/static-auth-required-loader.js
|
Beta Was this translation helpful? Give feedback.
-
@tlays Many thanks! Apparently, I wasn't paying attention enough. |
Beta Was this translation helpful? Give feedback.
Hi @ZouTiger , I believe this is the example that you are looking for: https://github.com/gladly-team/next-firebase-auth/blob/main/example/pages/static-auth-required-loader.js
withAuthUser
HOCconst AuthUser = useAuthUser()
to retrieve the instance of the currently logged in userconst token = await AuthUser.getIdToken()
to retrieve auth token