Skip to content

Add Google OAuth2 based authentication #9

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

varun-r-mallya
Copy link

Google Authentication complete
Problems:

  • Hash and Salt fields are still there. Not removed yet.
  • Google Authentication credentials are committed due to issues in environment variables.

Documentation:
Authentication routes and pipeline configuration.

Routes

The /auth scope handles authentication-related endpoints:
* GET /auth/ping - Basic connectivity check
* GET /auth/google - Initiates Google OAuth flow (To test, on your browser, visit localhost:4000/auth/google)
* GET /auth/google/callback - Handles Google OAuth callback (Frontend people don't have to deal with this)
* GET /auth/logout - Handles user logout (Just GET this to logout)

Pipeline

The :authenticated_api pipeline provides authentication middleware:
* Accepts JSON requests
* Enables session handling
* Authenticates requests via AuthPlug

NOTES:
Automatically adds cookie to the browser and does auth check

@varun-r-mallya varun-r-mallya requested review from Darkhood148 and rizul2108 and removed request for Darkhood148 April 2, 2025 15:35
Copy link
Author

Merge pls :)

@varun-r-mallya varun-r-mallya requested review from Darkhood148 and rizul2108 and removed request for rizul2108 and Darkhood148 April 3, 2025 19:32
@varun-r-mallya varun-r-mallya changed the title Varun r mallya/google auth Add Google OAuth2 based authentication Apr 3, 2025
@rizul2108
Copy link
Member

@Darkhood148 you also review works fine from my side

@Darkhood148
Copy link
Collaborator

Dotenv k alava env reader dependencies hta do. Then merge. GTG mere side se
@varun-r-mallya

@varun-r-mallya
Copy link
Author

@Darkhood148 @rizul2108

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