akazadd / NimbleTechTest

This repository contains the iOS technical test project for Nimble - a demonstration of skills in iOS development for the technical evaluation process.
0 stars 0 forks source link

[Question] Refresh token logic concerns #28

Open minhnimble opened 11 months ago

minhnimble commented 11 months ago

Right now I notice that you apply the refresh token logic when you call the login API on the Login screen only, which means it might only trigger when the users click on the Login button and the Login API call returned 401. Why do you choose to implement the logic like this approach? How would you solve the issue when the users is active on the Home screen, then leave it idle to do something else, and the token expires when they resume using the application? At this point, the only way for the user to continue calling the APIs (e.g., refresh Home screen), is to restart the application, right? Please note that the refresh token life span for our APIs is pretty short (7200 = 2 hours). 💭

akazadd commented 11 months ago

Pull Request -> https://github.com/akazadd/NimbleTechTest/pull/33