{!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 SignInWithCodeAsync | Authentication | 3.1.0
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SignInWithCodeAsync

    SignInWithCodeAsync(bool, CancellationToken)

    Asynchronously attempts to sign in using the previously generated sign-in code. This method can optionally poll the server for sign-in confirmation.

    Declaration
    Task SignInWithCodeAsync(bool usePolling = false, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    bool usePolling

    If set to true, the method will continuously poll the server to check if the code has been confirmed, until either the device signs in successfully, the code expires, or the CancellationToken is triggered. False by default.

    CancellationToken cancellationToken

    A token used to cancel the ongoing operation, especially useful when polling is enabled.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Exceptions
    Type Condition
    AuthenticationException

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

    RequestFailedException

    Thrown when there's an issue with the network request.

    In This Article
    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)