Yandex ID login for games
Before you start
Section titled “Before you start”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.
In the Dashboard
Section titled “In the Dashboard”Choose an environment in the header, open Project settings → Authentication and add a Yandex ID connection.
| Field | Meaning |
|---|---|
Client ids | The id of your Yandex OAuth app. One id: an OAuth token of another app is refused. |
In the game
Section titled “In the game”The game runs the Yandex OAuth flow and sends the access token it got.
TypeScript
Section titled “TypeScript”import { Session } from '@rudder/sdk';
const session = await Session.signIn(key, { provider: 'yandex', payload: { token },});C# and Unity
Section titled “C# and Unity”using RudderSdk;
var session = await Session.SignInAsync(key, new ProviderSignIn{ Provider = "yandex", Payload = new Dictionary<string, object?> { ["token"] = token },});What the platform checks
Section titled “What the platform checks”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.
Errors
Section titled “Errors”- An invalid or foreign token answers
401 unauthorized. - Yandex not answering answers
503 try_again.
The rest are in Errors.