Skip to content

Yandex ID login for games

An OAuth app in the Yandex developer console with the platform of the game enabled. Yandex has no key set to check a token offline, so every sign-in asks Yandex once.

Choose an environment in the header, open Project settings → Authentication and add a Yandex ID connection.

FieldMeaning
Client idsThe id of your Yandex OAuth app. One id: an OAuth token of another app is refused.

The game runs the Yandex OAuth flow and sends the access token it got.

import { Session } from '@rudder/sdk';
const session = await Session.signIn(key, {
provider: 'yandex',
payload: { token },
});
using RudderSdk;
var session = await Session.SignInAsync(key, new ProviderSignIn
{
Provider = "yandex",
Payload = new Dictionary<string, object?> { ["token"] = token },
});

The platform asks login.yandex.ru with the token and accepts the answer only when the token was issued for your client id. The player is the Yandex user id; the display name or the login fills a nickname the player does not have yet.

  • An invalid or foreign token answers 401 unauthorized.
  • Yandex not answering answers 503 try_again.

The rest are in Errors.