-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Bug fix: Fixed Firebase promises so that errors/exceptions can be caught #2503
Merged
thedavidprice
merged 3 commits into
redwoodjs:main
from
cjreimer:cjr-auth-firebase-promises
May 14, 2021
Merged
Bug fix: Fixed Firebase promises so that errors/exceptions can be caught #2503
thedavidprice
merged 3 commits into
redwoodjs:main
from
cjreimer:cjr-auth-firebase-promises
May 14, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
peterp
reviewed
May 13, 2021
Comment on lines
+30
to
+33
// Firebase auth functions return a goog.Promise which as of 2021-05-12 does | ||
// not appear to work with try {await} catch blocks as exceptions are not caught. | ||
// This client returns a new standard Promise so that the exceptions can be | ||
// caught and no changes are required in common auth code located in AuthProvider.tsx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oooof, that's a good catch 🙌
peterp
approved these changes
May 13, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this, this looks good to me.
fveauvy
pushed a commit
to fveauvy/redwood
that referenced
this pull request
May 15, 2021
Co-authored-by: David Price <thedavid@thedavidprice.com>
dac09
added a commit
to dac09/redwood
that referenced
this pull request
May 19, 2021
…-codegen * 'main' of github.com:redwoodjs/redwood: (54 commits) Add private methods loose explicitly (redwoodjs#2554) Custom `useAuth` pass through for `RedwoodApolloProvider` (redwoodjs#2455) Prerender all routes nested in Set with prerender prop (redwoodjs#2542) Upgrade eslint and prettier packages including formatting fixes (redwoodjs#2540) contributors updates (redwoodjs#2544) Rename default datasource (redwoodjs#1941) Add default config for Component generation (redwoodjs#1814) build(deps): bump core-js from 3.10.1 to 3.12.1 (redwoodjs#2481) upgrade babel 7.14.2 with misc babel packages (redwoodjs#2541) build(deps): bump http-proxy-middleware from 1.1.0 to 2.0.0 (redwoodjs#2536) build(deps): bump pino-pretty from 4.7.1 to 4.8.0 (redwoodjs#2534) build(deps): bump concurrently from 6.0.2 to 6.1.0 (redwoodjs#2533) build(deps-dev): bump firebase-admin from 9.7.0 to 9.8.0 (redwoodjs#2522) build(deps): bump esbuild-loader from 2.10.0 to 2.13.0 (redwoodjs#2518) build(deps): bump @graphql-tools/merge from 6.2.13 to 6.2.14 (redwoodjs#2516) updating minor dependency versions across packages (redwoodjs#2532) Add JSON headers to Function generator template (redwoodjs#2457) fixed firebase promises so that they can be caught (redwoodjs#2503) Prevent re-initialization of a Firebase app that is already initialized (redwoodjs#2504) build(deps-dev): bump magic-sdk from 2.7.0 to 4.3.0 (redwoodjs#2463) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This addresses #2461
Firebase promises cannot be caught with try { await } catch blocks, and thus all Firebase exceptions were unhandled, even if the user's application tried to catch the exception. A simple way to generate a Firebase exception is to try to sign on with an invalid e-mail address. I utilized some slight modifications to the playground-auth app for testing.
@peterp I'll tag you as you helpfully reviewed the issue I presented.