From 3a9ffedce44f2f0141ad853ce0a9ad889d3f5507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=87=BF=E8=B5=AB?= Date: Wed, 21 Feb 2024 17:27:24 +0800 Subject: [PATCH] feat: support phone and Email in /api/login/oauth/access_token API (#2725) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phone Number supports for /api/login/oauth/access_token as username ✅ Closes: #2724 --- object/token.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object/token.go b/object/token.go index f9d8f368..d014e35a 100644 --- a/object/token.go +++ b/object/token.go @@ -681,7 +681,7 @@ func GetAuthorizationCodeToken(application *Application, clientSecret string, co // GetPasswordToken // Resource Owner Password Credentials flow func GetPasswordToken(application *Application, username string, password string, scope string, host string) (*Token, *TokenError, error) { - user, err := getUser(application.Organization, username) + user, err := GetUserByFields(application.Organization, username) if err != nil { return nil, nil, err }