Open Siilwyn opened 5 years ago
Same issues here :(
@alpfactory-alex please add a '+1' (:+1:) reaction to the main issue post so this gets more visibility.
Bump, @schmidt-sebastian thoughts?
Question: if you could configure the Node.js admin SDK to act as a specific user rather than as an admin, would that suffice for your needs?
@ryanpbrewster partly maybe, it would still require some working around the issue but it will be only one request. However the JS SDK would need to be able to authenticate with an auth token too.
Assume I could then use the Node.js admin SDK to get a user specific auth token and pass it to the front-end:
refreshToken
Question: if you could configure the Node.js admin SDK to act as a specific user rather than as an admin, would that suffice for your needs?
This is exactly what I'm looking for. Do you have any updates if this is actively being worked on or at least in the roadmap?
I am having a similar issue for a batch job which would run for over 5 - 6 hours and the token expires and there is currently no way to refresh it . This is really an oversight from the Firebase team to have an authentication system without proper refresh token system working. Compared to it Cognito and other auth systems are way more superior and provide more advanced use case scenarios . If anyone is starting a new enterprise-class application that would require a long-running job for huge data I would strongly recommend going with Cognito or some mature system rather than a weak firebase. Seems this issue was there from its inception and the firebase team still fails to address it and a great hindrance for our app and many others like us.
@avolkovi @hsubox76 Any chance this would be worked on any time soon? It's 2023, most web apps use SSR, and Firebase SDK still doesn't seem to provide a solution for this.
Environment
Problem
Trying to use Firebase Auth in combination with Server Side Rendering (in Nuxt). The server renders the requested page, and in order to do that it needs to fetch data from Firestore which in turn requires authentication. The page code is isomorphic, on initial request it runs on both the server and client using the JS SDK. Giving the advantages of SSR combined with the benefit of following Firestore rules.
My current solution is to generate a custom token from a refresh token which is pretty slow since three (http) requests are needed in-between to achieve this. Then logging in using
signInWithCustomToken
, diagram to clarify:My request would be to make it possible to sign in using a refresh token, if possible? Or add something else to support this use-case.