ソースを参照

fix(oauth): Send id_token of the authorized user instead of Guest

This only affects OAuth clients that use `id_token` obtained from `frappe.integrations.oauth2.get_token`.

Doesn't affect OAuth clients that ignore id_token and explicitly use `frappe.integrations.oauth2.openid_profile` endpoint for getting user details. e.g. Frappe OAuth client.

A simple way to replicate this is to setup Frappe-Frappe OAuth client-server pair and use `login_via_oauth2_id_token` instead of `login_via_oauth2` in `login_via_frappe`.
version-14
Aditya Hase 3年前
コミット
93320ce6e7
この署名に対応する既知のキーがデータベースに存在しません GPGキーID: A55F0FCA0234972
1個のファイルの変更1行の追加4行の削除
  1. +1
    -4
      frappe/oauth.py

+ 1
- 4
frappe/oauth.py ファイルの表示

@@ -323,10 +323,7 @@ class OAuthWebRequestValidator(RequestValidator):
# Check whether frappe server URL is set
id_token_header = {"typ": "jwt", "alg": "HS256"}

user = frappe.get_doc(
"User",
frappe.session.user,
)
user = frappe.get_doc("User", request.user)

if request.nonce:
id_token["nonce"] = request.nonce


読み込み中…
キャンセル
保存