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

Add google auth setup #5

Merged
merged 51 commits into from
Feb 26, 2024
Merged

Add google auth setup #5

merged 51 commits into from
Feb 26, 2024

Conversation

pks03
Copy link
Collaborator

@pks03 pks03 commented Feb 24, 2024

No description provided.

Copy link

gitguardian bot commented Feb 24, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9654157 Triggered Google OAuth2 Keys f68e51f backend/config/default.ts View secret
9654157 Triggered Google OAuth2 Keys c42b0ee backend/config/default.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@thenicekat
Copy link
Owner

Check naming of the PRs. Also restructure them into service and route

}
);
return res.data;
} catch (error: any) {
Copy link
Owner

Choose a reason for hiding this comment

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

remove unnecessary comments ig

@thenicekat thenicekat changed the title for uday Add google auth setup Feb 24, 2024
@Saphereye
Copy link
Collaborator

Saphereye commented Feb 24, 2024

@Divyateja04 we should merge after the secrets are removed

Copy link
Owner

Choose a reason for hiding this comment

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

can't we use constants.ts for this tho

@@ -37,6 +40,9 @@ app.use(session({
// Add routes
app.use('/hello', helloRouter)
app.use('/posts', postsRouter)
app.use("/api/sessions/oauth/google", gauthRouter)
app.use('/user/signup',userRouter)
Copy link
Owner

Choose a reason for hiding this comment

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

this should be /user not /user/signup


export const userRouter = Router();

userRouter.post("/user/signup", async (req, res) => {
Copy link
Owner

Choose a reason for hiding this comment

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

make this /signup not /user/signup.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok

@thenicekat thenicekat merged commit 57f3f6f into main Feb 26, 2024
0 of 2 checks passed
@thenicekat thenicekat deleted the oauth branch February 26, 2024 15:57
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.

3 participants