Home > OS >  I want to create a new token for the customer in the background Android Studio application
I want to create a new token for the customer in the background Android Studio application

Time:01-17

As part of our Android app. After the registration part, we are using SharedPreferences for staying connected. so the customer will register one time and then stays connected without the login part. the problem is i dont know how to send the registration details when i need to renew the custome's token(We want to create the token after 7 days).

In registration we are using json(token creation happans in the backend code(C#)).

Please assist. Tnx.

CodePudding user response:

Here's an idea: save also the registration information along with the time registered on (in milliseconds for example) and in your splash screen, and if the 7 days are passed: Just resend these registration info and rewrite the customer's token.

CodePudding user response:

Ask API developer to add an error with 403 error code when the token is expired. When you get a 403 error in API then redirect to the user on the login page.

  •  Tags:  
  • Related