Custom ID of an external server

Good morning,
I made an authentication system with a node.js server and a database. And I wanted to know how to connect an account to the Unity authentication service using a unique Id provided by my server.

Hi,

Follow this: Custom ID sign-in

Basically

  1. Set up CustomID and Service Account in DashBoard
  2. In your node.js make api calls to Token Exchange API then use token in Sign In With Custom ID API and use your provided id as externalId.
  3. Pass the idToken and sessionToken to client.
  4. In the game client use ProcessAuthenticationTokens like so
await AuthenticationService.Instance.ProcessAuthenticationTokens(idToken, sessionToken);

if username set up is in your server then you can pass the name and use

await AuthenticationService.Instance.UpdatePlayerNameAsync(username);
1 Like