mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
Include email in response to API key retrieval
This helps our iOS app when authenticating via Google Apps, since we don't get the users' email address when we get the ID token from Google. (imported from commit 066639958c1e8f7845505ebdabc37282defca5c5)
This commit is contained in:
@@ -1591,7 +1591,7 @@ def api_fetch_api_key(request, username=REQ, password=REQ):
|
||||
return json_error("Your username or password is incorrect.", data={"reason": "incorrect_creds"}, status=403)
|
||||
if not user_profile.is_active:
|
||||
return json_error("Your account has been disabled.", data={"reason": "disabled"}, status=403)
|
||||
return json_success({"api_key": user_profile.api_key})
|
||||
return json_success({"api_key": user_profile.api_key, "email": user_profile.email})
|
||||
|
||||
@authenticated_json_post_view
|
||||
@has_request_variables
|
||||
|
||||
Reference in New Issue
Block a user