Skip to content

Commit 0d9658b

Browse files
committed
fix: on_auth_data hook
The key LeanEngine received is not `object` but `authData`. Thank @cshuaimin for bringing this to our attention.
1 parent 9b46377 commit 0d9658b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

leancloud/engine/leanengine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ def dispatch_on_auth_data(_cloud_codes, app_params, params):
533533
if not func:
534534
return
535535

536-
auth_data = params["object"]
536+
auth_data = params["authData"]
537537
return func(auth_data)
538538

539539

tests/test_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ def on_auth_data(auth_data):
509509

510510
response = requests.post(
511511
url + "/__engine/1.1/functions/_User/onAuthData",
512-
json={"object": {
512+
json={"authData": {
513513
"foo": {
514514
"openid": "openid",
515515
"access_token": "access_token",

0 commit comments

Comments
 (0)