Exemplo n.º 1
0
        private async void OnClickSignIn()
        {
            try
            {
                AuthFlowResponse response = await CognitoClient.StartWithSrpAuthAsync(Username.text, Password.text);

                MessageText.text = "TokenType: " + response.AuthenticationResult.TokenType;
                Debug.Log("IdToken: " + response.AuthenticationResult.IdToken);
            }
            catch (Exception ex)
            {
                MessageText.text = ex.ToString();
            }
        }
Exemplo n.º 2
0
        private async void OnClickSignIn()
        {
            try
            {
                AuthFlowResponse response = await CognitoClient.StartWithSrpAuthAsync(Username.text, Password.text);

                IdToken = response.AuthenticationResult.IdToken;

                if (!string.IsNullOrEmpty(IdToken))
                {
                    MessageText.text = "Login success";
                }
            }
            catch (Exception ex)
            {
                MessageText.text = ex.ToString();
            }
        }