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

    Show / Hide Table of Contents

    Method GenerateSignInCodeAsync

    GenerateSignInCodeAsync(string)

    Asynchronously generates a sign-in code that can be used to sign in. This method should be called before attempting to sign in using the sign-in code.

    Declaration
    Task<SignInCodeInfo> GenerateSignInCodeAsync(string identifier = null)
    Parameters
    Type Name Description
    string identifier

    An optional identifier. If provided, it may influence the generated sign-in code or be used for additional checks.

    Returns
    Type Description
    Task<SignInCodeInfo>

    A Task representing the asynchronous generation operation. The task result contains the generated SignInCodeInfo details:

    • SignInCodeThe unique code generated for signing in. This code should be used in subsequent sign-in attempts.
    • ExpirationThe date and time when the generated sign-in code will expire and become invalid for sign-in attempts.
    Exceptions
    Type Condition
    AuthenticationException

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

    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)