WAX Unity Web3 Suite
AnchorLink
AnchorLink
  • Getting Started
  • Installation
    • WebGL installation
  • Examples
    • Quick Start
    • Login
    • Transact (with a Session)
    • Transact (without a Session)
    • Token Transfer
    • Vote
    • Manage CPU/NET
    • Sell Ram
    • Buy Ram
    • Bid Name
  • API Docs
    • AnchorLinkSharp
      • AnchorLink
      • ChannelInfo
      • Defaults
      • IdentifyResult
      • LinkAbiData
      • LinkCallback
      • LinkChannelSession
      • LinkChannelSessionData
      • LinkConstants
      • LinkCreate
      • LinkFallbackSession
      • LinkFallbackSessionData
      • LinkInfo
      • LinkOptions
      • LinkSession
      • LinkSessionDataBase
      • LinkSessionDataConverter
      • LinkSignatureProvider
      • LinkSignatureProviderArgs
      • LinkUtils
      • LoginResult
      • SealedMessage
      • SerializedLinkSession
      • TransactArgs
      • TransactOptions
      • TransactResult
      • WebSocketWrapper
      • Interfaces
        • ILinkOptions
        • ILinkStorage
        • ILinkTransport
      • Exceptions
        • LinkException
        • IdentityException
        • CancelException
        • SessionException
    • EosioSigningRequest
      • AbiConstants
      • CallbackPayload
      • IZlibProvider
      • IdentityV2
      • IdentityV3
      • InfoPair
      • RejectedPayload
      • RequestSignature
      • ResolvedCallback
      • ResolvedSigningRequest
      • SigningRequest
      • SigningRequestAbi
      • SigningRequestConstants
      • SigningRequestCreateArguments
      • SigningRequestCreateIdentityArguments
      • SigningRequestData
      • SigningRequestEncodingOptions
      • TransactionContext
      • TransactionHeader
    • AnchorLinkTransportSharp
      • Transports
        • UnityTransport
        • UnityCanvasTransport
        • UnityUiToolkitTransport
          • ScreenBase
          • PanelBase
          • FailurePanel
          • LoadingPanel
          • QrCodePanel
          • SigningTimerPanel
          • SuccessPanel
          • TimeoutPanel
          • Utils
      • StorageProviders
        • PlayerPrefsStorage
        • JsonLocalStorage
      • TransportOptions
      • NetZlibProvider
Powered by GitBook
On this page
Edit on GitHub
  1. Examples

Login

PreviousQuick StartNextTransact (with a Session)

Last updated 2 years ago

Login

  1. Add a method calling the Login(identifier)-Method of the .

  2. When this method is called from your UI, the Transport will show and request the user to open AnchorWallet to log in.

  3. After succesfully logging in, data about the account selected and additional session-data is returned to your application and is available for use within the session-variable returned.

  4. Storing the session will allow you to to prompt the user with a Transaction-Request without the user having to log in again.


internal LinkSession mySession;
internal async Task LoginAndStoreSession()
{
	try
	{
		var loginResult = await myLink.Login(Identifier);
		mySession = loginResult.Session;
		Debug.Log($"{mySession.Auth.actor} logged-in");
	}
	catch (Exception ex)
	{
		Debug.LogError(ex.Message);
	}
}
previously instantiated AnchorLink
Page cover image