These are the docs for 14.3, an old version of SpatialOS. 14.5 is the newest →

PlatformRefreshTokenCredential Class

Namespace: Improbable.SpatialOS.Platform.Common

This provides support to automatically acquire access tokens from SpatialOS refresh tokens.



Static Fields

PlatformRefreshTokenCredential AutoDetected

Gets an instance of the PlatformRefreshTokenCredential class by retrieving the locally stored refresh token from a file. It tries to determine the path to the refresh token in the following order:


PlatformRefreshTokenCredential(IAuthorizationCodeFlow flow, string userId, TokenResponse token)

This constructor provides a way to allow more control over the OAuth 2.0 authentication flow.

  • IAuthorizationCodeFlow flow : The OAuth authorization flow.
  • string userId : The user ID string.
  • TokenResponse token : The OAuth token.


PlatformRefreshTokenCredential????????(string refreshToken, string authServerUrl = null, string tokenServerUrl = null, IEnumerable<string> scopes = null, ClientSecrets clientSecrets = null)

Initializes a new instance of the PlatformRefreshTokenCredential class that uses the supplied refresh token to authenticate with Improbable's OAuth servers.

  • string refreshToken : The SpatialOS refresh token.
  • string authServerUrl : The URL of the OAuth auth server. Defaults to Improbable's production OAuth auth server.
  • string tokenServerUrl : The URL of the OAuth token server. Defaults to Improbable's production OAuth token server.
  • IEnumerable<string> scopes : The scope to request for the OAuth server. Defaults to "[*]:*".
  • ClientSecrets clientSecrets : The client secrets for the SpatialOS refresh token.

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums