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
- Set up CustomID and Service Account in DashBoard
- 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.
- Pass the idToken and sessionToken to client.
- 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