fix: update scope for apple login
This commit is contained in:
parent
395e2e2a85
commit
fadd9f6168
|
@ -499,8 +499,11 @@ func processAppleUserInfo(code string) (models.User, error) {
|
|||
}
|
||||
|
||||
if val, ok := claims["name"]; ok {
|
||||
givenName := val.(string)
|
||||
nameData := val.(map[string]interface{})
|
||||
givenName := nameData["firstName"].(string)
|
||||
familyName := nameData["lastName"].(string)
|
||||
user.GivenName = &givenName
|
||||
user.FamilyName = &familyName
|
||||
}
|
||||
|
||||
return user, err
|
||||
|
|
|
@ -130,7 +130,7 @@ func InitOAuth() error {
|
|||
AuthURL: "https://appleid.apple.com/auth/authorize",
|
||||
TokenURL: "https://appleid.apple.com/auth/token",
|
||||
},
|
||||
Scopes: []string{"name", "email"},
|
||||
Scopes: []string{"openid", "name", "email"},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user