-
Notifications
You must be signed in to change notification settings - Fork 1
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
#187419056 Add Google authentication to enhance user login #20
Conversation
src/__test__/google.auth.test.ts
Outdated
@@ -0,0 +1,66 @@ | |||
import app from "../app"; |
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.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
487d631
to
2d76359
Compare
@@ -0,0 +1,47 @@ | |||
import { GOOGLE_CALLBACK_URL, PORT } from "../utils/keys"; |
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.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
import swaggerDoc from "./swagger.json"; | ||
import { PORT } from "../utils/keys"; | ||
import users from "./user"; | ||
import basicInfo from "./basicInfo"; |
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.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
2d76359
to
b20cb8d
Compare
import { google_profile } from "../mock/static"; | ||
jest.setTimeout(30000); | ||
|
||
function logErrors( |
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.
Identical blocks of code found in 2 locations. Consider refactoring.
e1c4b60
to
a49a112
Compare
- Integrate Google ID into the user model for OAuth. - Set up Google authentication strategy with Passport. - Establish '/auth/google' and '/auth/google/callback' routes. - Develop controller logic for handling Google OAuth. [Finishes #187419056]
- Added "migrate undo" and "migrate" commands to the test process. [Finishes #187419056]
a49a112
to
45dddc2
Compare
const { body } = await Jest_request.get("/").expect(200); | ||
}); | ||
|
||
it("should display login home page and return 200", async () => { |
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.
Identical blocks of code found in 2 locations. Consider refactoring.
}, | ||
], | ||
summary: "Request password reset", | ||
requestBody: { |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
required: true, | ||
description: "The reset password 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.
Similar blocks of code found in 3 locations. Consider refactoring.
name: "request body", | ||
required: true, | ||
}, | ||
], |
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.
Similar blocks of code found in 3 locations. Consider refactoring.
Code Climate has analyzed commit 45dddc2 and detected 7 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 61.7% (60% is the threshold). This pull request will bring the total coverage in the repository to 87.5% (-3.5% change). View more on Code Climate. |
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.
Good Job Clement
What does this PR do?
This PR aims to enhance user login by adding Google authentication. By implementing this feature, users will be able to log in using their pre-existing Google accounts.
Description of Task to be completed?
The following endpoints need to be functional:
GET /api/v1/users/auth/google
GET /api/v1/users/auth/google/callback
How should this be manually tested?
To verify the changes introduced by this PR:
Clone the repository and navigate to the project directory.
Run npm install to install the necessary dependencies.
Check the env-example file and create a .env file, filling in the environment variables as specified in the example.
Start the application by running npm run dev.
There are two ways to test the Google authentication:
What are the relevant pivotal tracker/Trello stories?
#187419056.