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

Implemented Google and Email SignIn Pages #194

Conversation

habeeba-naaz
Copy link

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

Reviewer: Vinit Shahdeo

@ArpitKotecha
Copy link
Contributor

@habeeba-naaz remove the .vscode dir and also add it to .gitignore.

@ArpitKotecha
Copy link
Contributor

@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.

@ayan-biswas0412
Copy link

@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

@habeeba-naaz
Copy link
Author

habeeba-naaz commented Mar 22, 2020

Okay..I’ll do changes which you specified and then get back to you and thank you for providing resource @ArpitKotecha

@ayan-biswas0412 ayan-biswas0412 mentioned this pull request Mar 22, 2020
9 tasks
Copy link
Owner

@vinitshahdeo vinitshahdeo left a 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",
Copy link
Owner

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.

Copy link
Author

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?

Copy link
Contributor

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.

Copy link
Author

@habeeba-naaz habeeba-naaz Mar 26, 2020

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?

Copy link
Contributor

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.

Copy link
Author

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",
Copy link
Owner

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",
Copy link
Owner

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.

@ArpitKotecha
Copy link
Contributor

@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.

@habeeba-naaz
Copy link
Author

About whom are you talking me?@ArpitKotecha regarding fronted branch?

@ArpitKotecha
Copy link
Contributor

About whom are you talking me?@ArpitKotecha regarding fronted branch?

Just asking for a suggestion from @vinitshahdeo

@PragatiVerma18
Copy link
Contributor

@habeeba-naaz Please resolve merge conflicts first.

@PragatiVerma18 PragatiVerma18 added frontend gssoc20 Welcome to GirlScript Summer of Code 2020 medium medium level issue labels Apr 14, 2020
@PragatiVerma18
Copy link
Contributor

@habeeba-naaz any updates on this??

@habeeba-naaz
Copy link
Author

Sorry...please unassign me ...unable to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend gssoc20 Welcome to GirlScript Summer of Code 2020 medium medium level issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants