-
Notifications
You must be signed in to change notification settings - Fork 5
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
base: main
Are you sure you want to change the base?
Conversation
@@ -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", |
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.
why did you downgrade the version?
@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; |
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.
Do not use var
const [instance, setInstance] = useState(null); | ||
useEffect(() => { | ||
setInstance(getFirebase()); | ||
}, []); | ||
return instance; |
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.
Why do we need to use useEffect
and useState
here?
Can't we do the following?
const [instance] = useState(getFirebase());
return instance;
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.
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"; |
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.
Sure about the value of this string?
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.
Okay bhaiya, I will correct it.
Your checklist for this pull request
🚨Please review the guidelines for contributing to this repository.
Description
Fixes #7
❤️Thank you!
Post merge checklist