Setting Up Custom ID from external Token

Hi, I’m trying to build a WebGL that takes a token string from web log-on and use it to pass to UGS Authentication, if it’s new then a Unity account is created.

I’ve been trying to read the docs but it seems I need to use service token for each account logged in?

I’m not sure how to call api from the Cloud code (I’m using C#).

I think the process would be something like this?

  1. Get JWT from the wrapper (done)
  2. Send the token to cloud code, decode to verify.
  3. Fetch AuthToken if it matches a user, generate new one if not.
  4. Back in client use the AuthToken in AuthenticationService.Instance.ProcessAuthenticationTokens.

I’m stuck on #3 as I can’t seem to get my head around the concept. Thanks in advance!