-
Notifications
You must be signed in to change notification settings - Fork 263
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
Implemented Google and Email SignIn Pages #194
Implemented Google and Email SignIn Pages #194
Conversation
@habeeba-naaz remove the .vscode dir and also add it to .gitignore. |
@habeeba-naaz Also it looks like you have implemented the auth in a frontend page instead of creating an api. Take a look at this Securing your express/Node.js API with Firebase auth for help in implementing firebase admin SDK. |
I can do this easily with firebase api please assign me @ArpitKotecha |
Okay..I’ll do changes which you specified and then get back to you and thank you for providing resource @ArpitKotecha |
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.
@habeeba-naaz Hey - I have added few comments, please have a look.
<script> | ||
// Your web app's Firebase configuration | ||
var firebaseConfig = { | ||
apiKey: "AIzaSyB5IScRHMh_E2rV7sZ0vXi8a13WQtv9Kas", |
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.
@habeeba-naaz Security threat
: Please do not expose any API tokens. Replace it with XXXXXXXXXXX
. Add a comment with the URL to get the API key.
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 sure..thank you for your advice @vinitshahdeo. I have some doubts regarding this issue..do I need to write client side code also along with server api? If so where should I do client side code?
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.
@@habeeba-naaz Write a function to verify jwt token and to refresh the token if it expired or revoked.
Take a look at this to verify token.
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 I will check...I am not understanding how to do from backend side?
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 I will check...I am not understanding how to do from backend side?
You will get a jwt token from frontend so just create a function to verify the token and then parse it.
Use firebase admin sdk to verify.
Here's how to setup Firebase Admin SDK.
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.... thank you...I’ll check
@@ -30,7 +30,8 @@ | |||
"mongoose": "^5.9.2", | |||
"morgan": "^1.9.1", | |||
"node-esapi": "0.0.1", | |||
"sanitizer": "^0.1.3" | |||
"sanitizer": "^0.1.3", |
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.
@habeeba-naaz Ideally, the dependencies should be ordered lexicographically.
<script> | ||
// Your web app's Firebase configuration | ||
var firebaseConfig = { | ||
apiKey: "AIzaSyB5IScRHMh_E2rV7sZ0vXi8a13WQtv9Kas", |
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.
@habeeba-naaz Please remove the sensitive data. Never push API Keys/tokens to the GitHub.
@vinitshahdeo Should he merge on the html files (or pass on by creating a issue and ref the files) he has written to frontend branch so they can use the code to implement login client side. |
About whom are you talking me?@ArpitKotecha regarding fronted branch? |
Just asking for a suggestion from @vinitshahdeo |
@habeeba-naaz Please resolve merge conflicts first. |
@habeeba-naaz any updates on this?? |
Sorry...please unassign me ...unable to do |
Description
I have created Login Page.html and Success.html.Please review and let me know any changes to be done.
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.
Fixes #157
Type of change
Please delete options that are not relevant.
Checklist:
Reviewer: Vinit Shahdeo