Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Your session has expired. Please login in again. #158

Open
dp-singh opened this issue Apr 28, 2021 · 1 comment
Open

Your session has expired. Please login in again. #158

dp-singh opened this issue Apr 28, 2021 · 1 comment

Comments

@dp-singh
Copy link

Hi,
I am using SDK version 3.3.1.

 private fun openSumUpLogin(viewState: SumUpPaymentSingleViewState.LaunchSumUpPayment) {
        val sumUpLogin = SumUpLogin
            .builder(viewState.affiliateKey)
            .accessToken(viewState.accessToken)
            .build()
        SumUpAPI.openLoginActivity(requireActivity(), sumUpLogin, REQUEST_CODE_LOGIN)
 }

 private fun checkoutSumUpPayment(viewState: SumUpPaymentSingleViewState.LaunchSumUpPayment) {
        val payment = SumUpPayment.builder() 
            .total(viewState.amount) 
            .currency(donationCurrency.getSumUpCurrency())
            .skipSuccessScreen()
            .title(viewState.screenTitle)
            .foreignTransactionId(viewState.randomId)
            .build()
        SumUpAPI.checkout(requireActivity(), payment, REQUEST_CODE_PAYMENT)
  }

  private fun launchSumUpCheckout(viewState: SumUpPaymentSingleViewState.LaunchSumUpPayment) {
        if (SumUpAPI.isLoggedIn()) {
            checkoutSumUpPayment(viewState)
        } else {
            openSumUpLogin(viewState)
        }
    }

I am using the above code to checkout the sum up sdk and refreshing token every time when the token "expires_in": 3600.

After doing the first transaction successfully if I try doing the same an hour after, I am getting error toast with Tu sesión ha caducado. Por favor vuelve a iniciar sesión. which translate too Your session has expired. Please login in again.

❓ Question

  • What is causing this problem?
  • Why is the notification showing french locale even though device is set to locale Uk?
  • Is there any way to check token expiry by expiring the current token from console or through api?
@DxTa
Copy link

DxTa commented Dec 21, 2022

it seems to be the case for me as well, although I did try to maintain the login session. This login session maintain was done by checking the logged status every now and then, and login again by token if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants