Search Unity

Question Connect with a Service Account and impersonate another player to use other services SDK (Lobby, ...)

Discussion in 'Authentication' started by BSimonSweet, May 4, 2023.

  1. BSimonSweet

    BSimonSweet

    Joined:
    Aug 17, 2022
    Posts:
    67
    Hi,

    With the C# SDK, it is possible to authenticate with a Service Account ? If so, is it possible to impersonate another player ? For example to update a Lobby data as this player.

    I would like to use a Service Account on the server build of the game and perform operation on other services (like Lobby and Matchmaker) as the player that started the game session.

    It seems possible to do that with the REST API, but it would be nice if the C# SDK support that too.
     
  2. erickb_unity

    erickb_unity

    Unity Technologies

    Joined:
    Sep 1, 2021
    Posts:
    92
    Hello

    We have plans to support it in our SDKs but no estimate at this point.

    For now, you can perform the rest api call using a unity web request directly.
     
    BSimonSweet likes this.
  3. erickb_unity

    erickb_unity

    Unity Technologies

    Joined:
    Sep 1, 2021
    Posts:
    92
    More information on the service account token exchange here:
    https://services.docs.unity.com/auth/v1

    This will grant an access token that can work with many of our services. But you will also need to call these services through rest apis to be able to pass this token
     
    BSimonSweet likes this.