Skip to content

Google One Tap implementation #1015

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

Merged
merged 6 commits into from
Feb 10, 2025
Merged

Conversation

kviktor
Copy link
Contributor

@kviktor kviktor commented Feb 7, 2025

Proposed changes

The changes adds Google One Tap as a backend

Checklist

Other information

You can test the changes with this dummy project https://github.com/kviktor/django-onetap-example

I haven't yet added tests or documentation but if the changes look okay I'll add them too.

I have 2 questions tho I'm not exactly sure about, maybe someone can help out

  • I've added google-auth as a dependency, technically it's just downloading Google's cert files then verifying the jwt token however I didn't want to reimplement the wheel for it and it's a bit safer this way imo
  • as it requires a new dependency I've added a new Python module for it, is that ok? (I can move it into google.py with catching ImportError and raising an exception if the library is missing in the class)

Docs at python-social-auth/social-docs#256

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.15%. Comparing base (326d4b3) to head (b828e46).
Report is 73 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1015      +/-   ##
==========================================
+ Coverage   77.88%   78.15%   +0.26%     
==========================================
  Files         347      348       +1     
  Lines       10669    10765      +96     
  Branches      504      457      -47     
==========================================
+ Hits         8310     8413     +103     
+ Misses       2200     2192       -8     
- Partials      159      160       +1     
Flag Coverage Δ
unittests 78.15% <100.00%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@nijel nijel left a comment

Choose a reason for hiding this comment

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

Looks okay at first look. Can you please add tests and documentation?

@kviktor
Copy link
Contributor Author

kviktor commented Feb 9, 2025

@nijel I've added some tests, because it's not on oauth flow they are a bit different.

Also added docs at python-social-auth/social-docs#256

Also switched from urllib3 to requests as I've just noticed this library already depends on it and that requirement doesn't need that weird packaging library workaround.

@nijel nijel merged commit 10dc10b into python-social-auth:master Feb 10, 2025
12 checks passed
@nijel
Copy link
Member

nijel commented Feb 10, 2025

Merged, thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants