{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method ProcessAuthenticationTokens | Authentication | 3.1.0
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ProcessAuthenticationTokens

    ProcessAuthenticationTokens(string, string)

    Process the accessToken issued by the Unity Authentication Service. Effectivelly setting the access token for other UGS services to use and extracting the playerId. If the session token is set the SDK will also process it and refresh the token at the expected intervals.

    Declaration
    void ProcessAuthenticationTokens(string accessToken, string sessionToken = null)
    Parameters
    Type Name Description
    string accessToken

    Unity Player Authentication accessToken used to access other UGS services

    string sessionToken

    sessionToken used to refresh the accessToken, if null the game server needs to refresh the accessToken on its own and call this method again

    Exceptions
    Type Condition
    AuthenticationException

    Thrown when the accessToken fails to parse.

    RequestFailedException

    Thrown when the current authentication state is invalid for this operation.

    In This Article
    • ProcessAuthenticationTokens(string, string)
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)