From 7deed6da1489f58c4adbd16c2af442486ddc2c58 Mon Sep 17 00:00:00 2001 From: Evan Sims Date: Tue, 16 Feb 2021 16:50:53 -0500 Subject: [PATCH] feat: Allow updating user metadata during onLogin event hook --- src/Auth0/Login/Auth0Service.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Auth0/Login/Auth0Service.php b/src/Auth0/Login/Auth0Service.php index 7845eb94..40b17c60 100644 --- a/src/Auth0/Login/Auth0Service.php +++ b/src/Auth0/Login/Auth0Service.php @@ -152,7 +152,11 @@ public function hasOnLogin() */ public function callOnLogin($auth0User) { - return call_user_func($this->_onLoginCb, $auth0User); + $user = call_user_func($this->_onLoginCb, $auth0User); + + $this->getSDK()->setUser($user); + + return $user; } /**