In Magento [2.2.4] web API when i pass username and password then it generates token for that specific customer (Which is only valid for 1 hour - it's configurable from admin)
which returns token.
After genrating token, when we pass that token in header.
Authorization :: Bearer *Token Value*
Which returns customer detailes.
The above case i explained is working fine for webAPI in magento2 which i tested in POSTMAN.
Now the case is,
Every hour regeneration of token and after that login again every hour is not logical for Mobile Application.
Then how Magentop manages user login data and authnticaltion in Mobile application, if it is developed API As per Service Contracts
- How long should I allow my access tokens to exist before
expiring them in Mobile Application?
- I don’t want to force my users to re-authenticate every hour in Mobile Application.
- how to properly manage your OAuth2 API token life-cycle for Mobile Application.
Making changes in Access Token Lifetime hours would not be logical solution, Because Application and web should have different lifetime hours of Token