-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix: Github API endpoint #14874
fix: Github API endpoint #14874
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #14874 +/- ##
===========================================
+ Coverage 49.57% 50.19% +0.61%
===========================================
Files 748 744 -4
Lines 65606 65469 -137
Branches 5485 5428 -57
===========================================
+ Hits 32527 32862 +335
+ Misses 29171 28746 -425
+ Partials 3908 3861 -47
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
@pateljannat I encountered the following error while using Github Login
Traceback (most recent call last):
File "/Users/sps/benches/develop/apps/frappe/frappe/app.py", line 66, in application
response = frappe.api.handle()
File "/Users/sps/benches/develop/apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "/Users/sps/benches/develop/apps/frappe/frappe/handler.py", line 31, in handle
data = execute_cmd(cmd)
File "/Users/sps/benches/develop/apps/frappe/frappe/handler.py", line 67, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/Users/sps/benches/develop/apps/frappe/frappe/__init__.py", line 1213, in call
return fn(*args, **newargs)
File "/Users/sps/benches/develop/apps/frappe/frappe/www/login.py", line 85, in login_via_github
login_via_oauth2("github", code, state)
File "/Users/sps/benches/develop/apps/frappe/frappe/utils/oauth.py", line 109, in login_via_oauth2
login_oauth_user(info, provider=provider, state=state)
File "/Users/sps/benches/develop/apps/frappe/frappe/utils/oauth.py", line 186, in login_oauth_user
if update_oauth_user(user, data, provider) is False:
File "/Users/sps/benches/develop/apps/frappe/frappe/utils/oauth.py", line 267, in update_oauth_user
user.set_social_login_userid(provider, userid=data["id"], username=data.get("login"))
KeyError: 'id'
Note: I did regular sign up (without Github) but used Github to sign in.
@pateljannat can you also add test cases to validate these changes? |
@Mergifyio backport version-13-hotfix |
✅ Backports have been created
|
Fixes: fossunited/mon_school#72 and #14810
Issue:
Fix: