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

Auth: Add Google OAuth #138

Merged
merged 9 commits into from
May 31, 2024
Merged

Auth: Add Google OAuth #138

merged 9 commits into from
May 31, 2024

Conversation

tianjing-li
Copy link
Collaborator

@tianjing-li tianjing-li commented May 15, 2024

  • Adds base Google OAuth logic
  • Modifies existing /login and /auth endpoints to interface with these Auth strategies

Note: OAuth not in usable state after merging this, will require JWT token

TODO:

  • Remove SessionMiddleware usage, replace with JWT token auth
  • E2E testing with FE

Copy link
Collaborator

@malexw malexw left a comment

Choose a reason for hiding this comment

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

There's nothing that really jumps out at me here, though it should probably get a review from someone who's more familiar with the backend than me.

src/backend/routers/auth.py Outdated Show resolved Hide resolved
src/backend/routers/auth.py Show resolved Hide resolved
src/backend/routers/auth.py Show resolved Hide resolved
.env-template Show resolved Hide resolved
@tianjing-li
Copy link
Collaborator Author

@EugeneLightsOn I've added this ticket: https://linear.app/cohereai/issue/EXT2-74/add-jwt-token-bearer-header-to-requests-remove-usage-of-session

To track the work of removing session and using a JWT token based auth

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 72.11538% with 29 lines in your changes are missing coverage. Please review.

Please upload report for BASE (main@f96ef06). Learn more about missing BASE report.

Files Patch % Lines
src/backend/routers/auth.py 51.61% 15 Missing ⚠️
src/backend/services/auth/google_oauth.py 75.00% 7 Missing ⚠️
src/backend/services/auth/utils.py 56.25% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #138   +/-   ##
=======================================
  Coverage        ?   87.85%           
=======================================
  Files           ?      116           
  Lines           ?     3673           
  Branches        ?        0           
=======================================
  Hits            ?     3227           
  Misses          ?      446           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@malexw malexw left a comment

Choose a reason for hiding this comment

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

🚢 🇮🇹

@tianjing-li tianjing-li merged commit 1f1c709 into main May 31, 2024
2 checks passed
@tianjing-li tianjing-li deleted the add-google-oauth branch May 31, 2024 15:21
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.

None yet

4 participants