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

Firebase: Generator #642

Closed
noire-munich opened this issue Jun 2, 2020 · 6 comments · Fixed by #643 or #729
Closed

Firebase: Generator #642

noire-munich opened this issue Jun 2, 2020 · 6 comments · Fixed by #643 or #729

Comments

@noire-munich
Copy link
Collaborator

Follow what's done for Netlify and auth0 to provide Firebase's generator.

@noire-munich
Copy link
Collaborator Author

@thedavidprice @peterp
PR is ready for review: #643 (comment)

@FiveBoroughs
Copy link

I've just tried setting up Firebase using the Generator and Doc.

A few things to report:
The firebase-admin package was not installed on the API workspace after the generator was run

The following line was added to the auth.js lib :
const { email, uid } = await adminApp.auth().verifyToken(token)
But the function name is verifyIdToken not verifyToken

The "Firebase Google sign-in" language was a little confusing, Firebase being a Google company, I didn't get that only signing in with a Google account was possible. So I only checked the Email/Password option in Firebase and didn't get what my issue was for a while.

After fixing those, I got it working, thanks for your contribution

@peterp
Copy link
Contributor

peterp commented Jun 20, 2020

Thanks for the feedback @FiveBoroughs

@FiveBoroughs
Copy link

We may need some more work on this, I'm getting a lot of these errors:
image

If you browse the website without refreshing any page and the token expires (1h), the verifyIdToken function will throw an exception and the whole frontend will go into "Something went wrong" mode

@peterp
Copy link
Contributor

peterp commented Jun 22, 2020

Hmmm... Ok, I can take a look at how it's implemented on the client side.

@noire-munich
Copy link
Collaborator Author

@FiveBoroughs I noticed it but it happens every few days or so on my app, because of code splitting.
I'd expect it to be a problem common to all Auth providers though and indeed a way to handle it in front would be awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants