diff --git a/openapi/user/entry.go b/openapi/user/entry.go index 21c083df..2e49886c 100644 --- a/openapi/user/entry.go +++ b/openapi/user/entry.go @@ -1083,10 +1083,10 @@ func GinVerifyInvite(c *gin.Context) { // Get authorized info from the temporary token authInfo := oauth.GetAuthorizedInfo(c) - if authInfo == nil || authInfo.Scope != ScopeInviteVerification { + if authInfo == nil || authInfo.Scope != ScopeEntryVerification { errorResp := &response.ErrorResponse{ Code: response.ErrInsufficientScope.Code, - ErrorDescription: "Invalid or missing token scope. Expected invite_verification scope", + ErrorDescription: "Invalid or missing token scope. Expected entry_verification scope", } response.RespondWithError(c, response.StatusForbidden, errorResp) return diff --git a/openapi/user/login.go b/openapi/user/login.go index dabd50c3..2f156e95 100644 --- a/openapi/user/login.go +++ b/openapi/user/login.go @@ -176,7 +176,7 @@ func LoginByUserID(userid string, loginCtx *LoginContext) (*LoginResponse, error extraClaims["remember_me"] = true } - accessToken, err := oauth.OAuth.MakeAccessToken(yaoClientConfig.ClientID, ScopeInviteVerification, subject, inviteExpire, extraClaims) + accessToken, err := oauth.OAuth.MakeAccessToken(yaoClientConfig.ClientID, ScopeEntryVerification, subject, inviteExpire, extraClaims) if err != nil { return nil, err } @@ -186,7 +186,7 @@ func LoginByUserID(userid string, loginCtx *LoginContext) (*LoginResponse, error AccessToken: accessToken, ExpiresIn: inviteExpire, TokenType: "Bearer", - Scope: ScopeInviteVerification, + Scope: ScopeEntryVerification, Status: LoginStatusInviteVerification, }, nil case "active":