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

feat: Setup Firebase Google OAuth #8

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sambit-sankalp
Copy link
Contributor

Your checklist for this pull request

🚨Please review the guidelines for contributing to this repository.

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your default branch!
  • Make sure you are making a pull request against the default branch (left side). Also you should start your branch off default branch.
  • Check the commit's or even all commits' message styles matches our requested structure.
  • Check your code additions will fail neither code linting checks nor unit test.
  • I have added necessary documentation (if appropriate)

Description

Fixes #7

Setup Google OAuth

❤️Thank you!

Post merge checklist

  • Follow steps from the guidelines for contributing to this repository.
  • If you are a new contributor, ping in the thread and one of the maintainers will add you to all-contributors list.

@@ -33,7 +33,7 @@
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.2",
"@material-ui/styles": "^4.11.4",
"firebase": "^9.0.2",
"firebase": "8.10.0",
"gatsby": "^3.12.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you downgrade the version?

@riteshsp2000
Copy link
Member

@sambit-sankalp. Hold on man, without even discussing what all is to be there, you are proceeding ahead

.signInWithPopup(provider)
.then((result) => {
dispatch({ type: LOGIN_SUCCESS });
var user = result.user;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use var

Comment on lines +5 to +9
const [instance, setInstance] = useState(null);
useEffect(() => {
setInstance(getFirebase());
}, []);
return instance;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to use useEffect and useState here?

Can't we do the following?

  const [instance] = useState(getFirebase());
  return instance;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can use do that also... I will take care of it.

@@ -0,0 +1,4 @@
export const AUTH_REQUEST = "AUTH_REQUEST";
export const LOGIN_SUCCESS = "LOGIN_SUCCESS";
export const AUTH_FAIL = "LOGINAUTH";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure about the value of this string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay bhaiya, I will correct it.

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 this pull request may close these issues.

Setup Firebase Google OAuth 2.0
3 participants