-
Notifications
You must be signed in to change notification settings - Fork 247
feat(firebase): add Google Account auth #52
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
Conversation
|
This PR has been automatically closed because we haven't received a response from the original author 🙈. This automation helps keep the issue tracker clean from PRs that are unactionable. Please reach out if you want to resume the work on this PR! 🙂 |
|
@machour @mcansh @MichaelDeBoey happy to abandon this if it's not wanted, but I've opened this PR 3 times now (#52, #4, remix-run/remix#4057), and rebased several times on request, now github actions is telling me you're waiting for a response from me 😄 |
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.
@penx Please rebase this branch onto latest main & resolve conflicts and remarks
Ported from remix-run/remix@e6022d2 fix yarn lock on main
ed593f3 to
d2f7e3e
Compare
Co-authored-by: Michaël De Boey <[email protected]>
|
@MichaelDeBoey rebased and confirmed it's all still working. Also addressed feedback and updated the docs a little. |
Co-authored-by: Michaël De Boey <[email protected]>
|
This PR has been automatically closed because we haven't received a response from the original author 🙈. This automation helps keep the issue tracker clean from PRs that are unactionable. Please reach out if you want to resume the work on this PR! 🙂 |
|
@MichaelDeBoey not sure why this was closed. Are you waiting for something from? |
|
Actually maybe it’s the hard coded localhost, had forgotten this needed addressing |
|
@penx This was indeed waiting for the hardcoded I'll re-open as I know we'll see the update in a timely manner. 😉 I'll also update the |
|
I have removed the 2 hard coded "localhost", and calculate redirectUri instead |
MichaelDeBoey
left a comment
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.
Some small remarks
|
|
||
| ## Deploying | ||
|
|
||
| 1. Follow the "Run against a Firebase Project" steps above if not done already |
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.
| 1. Follow the "Run against a Firebase Project" steps above if not done already | |
| 1. Follow the "Run against a Firebase project" steps above if not done already |
|
|
||
| ## Integration with Google Sign-in Provider | ||
|
|
||
| The "Login with Google" link will only work when running against a Firebase Project. |
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.
| The "Login with Google" link will only work when running against a Firebase Project. | |
| The "Login with Google" link will only work when running against a Firebase project. |
|
|
||
| The "Login with Google" link will only work when running against a Firebase Project. | ||
|
|
||
| After the steps in "Run against a Firebase Project" have been completed: |
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.
| After the steps in "Run against a Firebase Project" have been completed: | |
| After the steps in "Run against a Firebase project" have been completed: |
|
|
||
| After the steps in "Run against a Firebase Project" have been completed: | ||
|
|
||
| - In the [Firebase Console](https://console.firebase.google.com), navigate to Authentication > Sign-in method > Add new provider > Google. Make a note of the client ID and secret and add them to the .env file as GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET. |
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.
| - In the [Firebase Console](https://console.firebase.google.com), navigate to Authentication > Sign-in method > Add new provider > Google. Make a note of the client ID and secret and add them to the .env file as GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET. | |
| - In the [Firebase Console](https://console.firebase.google.com), navigate to Authentication > Sign-in method > Add new provider > Google. Make a note of the client ID and secret and add them to the `.env` file as `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`. |
| } | ||
| ) => { | ||
| const body = { | ||
| postBody: "id_token=" + idToken + "&providerId=" + providerId, |
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.
| postBody: "id_token=" + idToken + "&providerId=" + providerId, | |
| postBody: `id_token=${idToken}&providerId=${providerId}`, |
| ) => { | ||
| const body = { | ||
| postBody: "id_token=" + idToken + "&providerId=" + providerId, | ||
| requestUri: "http://localhost", |
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.
@penx Should this stay localhost? 🤔
| Link, | ||
| useActionData, | ||
| useLoaderData, | ||
| useLocation, |
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.
| useLocation, |
|
This PR has been automatically closed because we haven't received a response from the original author 🙈. This automation helps keep the issue tracker clean from PRs that are unactionable. Please reach out if you want to resume the work on this PR! 🙂 |
Reopening #4, remix-run/remix#4057 against remix-run/examples
Firebase example - Integration with Google Sign-in Provider
Closes: "sign-in with Google" suggestion at remix-run/remix#1811 (comment)
Adds a "Login with Google" link:
...that takes a user to the Google's auth screen:
...and then creates an account (if it doesn't yet exist) and signs them in: