-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: add VK ID provider #4400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: add VK ID provider #4400
Conversation
|
@afansv Change base domain for VK from id.vk.com to id.vk.ru. |
| PhoneNumber: response.User.Phone, | ||
| PhoneNumberVerified: response.User.Phone != "", // VK ID returns only verified phone number | ||
| Gender: gender, | ||
| Birthdate: response.User.BirthDay, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Глянь мой MR.
Я там подгоняю формат из российского в международный:
t, err := time.Parse("2.1.2006", user.BirthDay)
if err != nil {
return nil, errors.WithStack(herodot.ErrInternalServerError.WithReasonf("%s", err))
}
birthDay := t.Format("2006-01-02")| Picture: response.User.Avatar, | ||
| Email: response.User.Email, | ||
| EmailVerified: response.User.Email != "", // VK ID returns only verified email | ||
| PhoneNumber: response.User.Phone, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И ещё от VK телефон приходит без + в начале. Не знаю, важно это или нет, но я обновлял телефон так:
if len(userInfo.User.Phone) > 0 && userInfo.User.Phone[0] != '+' {
userInfo.User.Phone = "+" + userInfo.User.Phone
}
Problem
The existing VK (VKontakte) OAuth provider in Kratos is now outdated and unusable for newly registered applications, as VK OAuth no longer works for new apps.
Solution
VK ID is the modern official alternative that consolidates login across three popular CIS-region services: VKontakte (VK), Mail.Ru, and Odnoklassniki (OK.ru). Supporting VK ID significantly improves the social login experience for users in the CIS region.
Changes
Related issue(s)
No issues or design documents are associated with this change.
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got the approval (please contact
[email protected]) from the maintainers to push
the changes.
works.
Further Comments
This addition enables reliable social login for the major CIS platforms, which is highly valuable for Kratos users in those regions. Administrators should update their social provider configurations to use the new VK ID provider as needed. Documentation in the Ory docs repository will be updated soon to describe the new provider and its configuration options. Please review the implementation and tests and suggest any improvements.