public void Init()
        {
            signOutButton.SetActive(true);
            var btnComponent = signOutButton.GetComponent <SimpleTextButton>();

            btnComponent.onClick = () =>
            {
                AuthTokenHelper.DeleteToken(Constants.LAST_SUCCESS_AUTH_TOKEN);
                SceneManager.LoadScene("Login");
            };
        }
Ejemplo n.º 2
0
    private void SuccessAuthorization(AuthToken token, Action <AuthToken> success = null)
    {
        Debug.Log($"SUCCESS Token = {token}");
        if (rememberMeChkBox.isOn)
        {
            AuthTokenHelper.SaveToken(Constants.LAST_SUCCESS_AUTH_TOKEN, token);
        }
        else
        {
            AuthTokenHelper.DeleteToken(Constants.LAST_SUCCESS_AUTH_TOKEN);
        }

        success?.Invoke(token);
        OnSuccessfulLogin?.Invoke(token);
    }