Ionic Authentification

Asked

Viewed 43 times

0

I’d like some help, because I’ve been trying for days to think of a way to do this, but I still can’t quite figure out how to do it.

I have an Ionic application, where access happens through a login that gives me an access token that expires every 1 hour.

What is the best way to store this token and check whether it has expired or not? And how do I check routes on Ionic?

Thanks to anyone who can at least answer and give me a hand!

1 answer

1


The Route Verification part, read the section LIFE CYCLE from here, I think what you need is the 'ionViewCanEnter'

When the user logs in and you receive the API token, you can store this token in Localstorage and whenever you go to the page (here’s what I said about "ionViewCanEnter") you check to pull this token from Localstorage and see if it is valid.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.