Developing Yandex ID Authentication
Yandex ID is a standard OAuth2 provider with native SDK for mobile platforms. Demanded in apps targeting Russian audience, especially if app integrates with other Yandex services (Maps, Metrica, Market). Technically — classic OIDC with minimal quirks.
Integration
Yandex provides YandexLoginSDK for iOS (available via SPM and CocoaPods) and Android (Gradle). In developer account at oauth.yandex.ru create app, specify redirect URI, get client_id.
On iOS add URL Scheme yx{client_id} to Info.plist. SDK opens authorization in SFSafariViewController (doesn't leave app, unlike Custom Tabs on Android) — Yandex doesn't use native app-to-app flow like VK.
// iOS
YandexLoginSDK.shared.set(clientID: "YOUR_CLIENT_ID")
// Start authorization
try YandexLoginSDK.shared.authorize(
with: self, // UIViewController
customValues: nil
)
// In AppDelegate/SceneDelegate — redirect handling
func application(_ app: UIApplication, open url: URL, options: [...]) -> Bool {
return YandexLoginSDK.shared.handleOpen(url, sourceApplication: options[...])
}
After authorization get token (OAuth2 access token). To get user data — request to login.yandex.ru/info?format=json with Authorization: OAuth {token} header. Response contains id, login, default_email, real_name, default_avatar_id.
User avatar: https://avatars.yandex.net/get-yapic/{default_avatar_id}/islands-200 — standard URL for getting photo of needed size.
Server token verification: GET https://login.yandex.ru/info?oauth_token={token} — if token valid, returns user data. That's the verification: invalid token returns 401.
Yandex ID supports refresh tokens — with proper scope=login:info login:email login:avatar setup and force_confirm=false parameter SDK manages refresh automatically.
Timeline: 3-6 working days. Standard integration without unusual requirements.







