Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70757

Is there a way to log the user once, have a valid session for some days, then block access to app until login again?

$
0
0

@leonardofmed wrote:

My app should be used in the field work, where sometimes users don’t have internet connection. I already have a login system that uses JWT, and every DB requisition uses this JWT validation, but the core of my app don’t need immediate connection, all the data can be synchronized when a connection is estabilished later.

Right now when the user closes the app and reopen it, a request is sent to DB to check if the user’s JWT token is still valid, if so the user is logged in automatically. My problem is, without connection the user can’t log in. I wonder if there is a way to deal with access locally in a way that checks for the time of the last login and block access after x times, but also in a way that the user can’t mess with, i.e. edit this data. Is there a strategy to accomplish what I need?

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70757

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>