예제 #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();
            }
        }
예제 #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();
            }
        }