diff --git a/frappe/integrations/oauth2.py b/frappe/integrations/oauth2.py index 39f98e2f1b..bf71a68aaa 100644 --- a/frappe/integrations/oauth2.py +++ b/frappe/integrations/oauth2.py @@ -101,6 +101,10 @@ def authorize(**kwargs): frappe.local.response["type"] = "redirect" frappe.local.response["location"] = success_url else: + if "openid" in scopes: + scopes.remove("openid") + scopes.extend(["First Name", "Last Name", "Email", "Password", "User Image", "Roles"]) + # Show Allow/Deny screen. response_html_params = frappe._dict( { @@ -113,7 +117,7 @@ def authorize(**kwargs): resp_html = frappe.render_template( "templates/includes/oauth_confirmation.html", response_html_params ) - frappe.respond_as_web_page("Confirm Access", resp_html) + frappe.respond_as_web_page("Confirm Access", resp_html, primary_action=None) except (FatalClientError, OAuth2Error) as e: return generate_json_error_response(e) diff --git a/frappe/templates/includes/oauth_confirmation.html b/frappe/templates/includes/oauth_confirmation.html index 3fbbb75971..b5b3947ceb 100644 --- a/frappe/templates/includes/oauth_confirmation.html +++ b/frappe/templates/includes/oauth_confirmation.html @@ -1,22 +1,19 @@ {% if not error %}
{{ _("wants to access the following details from your account") }}