I have already integrated my website with a 3rd party API that authenticates users. It responds with their user ID. Now instead of storing the user ID, username, or password in localStorage, I would prefer to generate and store JWT tokens that expire every few days to keep user login information safe and secure.
There is no database. The JWT tokens must be generated in PHP. Essentially, the user will enter their username and password, which I will send to the 3rd-party API. That API passes back the user ID. If that is successful, we will ping the user ID again to get all the user's profile information, and then save all of that information into a JWT, which we will then send back to the user's browser to store in localStorage. The JWT tokens should auto-expire after 7 days, at which point, the API should return some message about the token being expired like "Your session has expired. Please log in again to access your account."
12 pekerja bebas membida secara purata $73 untuk pekerjaan ini
I am an experienced Web Developer having 4 years experience with WordPress/PHP. Please have a look on my expertise: # WordPress, Theme Customisation, Expert in Website Speed # HTML, Squarespace, WIX, AMP, Shopify