Persisted Login
Currently the login expires after 1 hour, even if you are continually using the app. Is it possible to implement a more sophisticated authentication system that would be able to persist logins, for example by using refresh tokens for example? It's not ideal that you have to login every time in order to add a record.
I am currently looking into building a mobile app that would allow you to do fuel-ups from your phone more easily, however not having this kind of persistent login would make having the app mostly irrelevant (without me saving the username and password directly, which is obviously not what I want to do ideally).
Is there any chance you would want to look into getting something like this implemented?
PS: Some API docs for the backend would be neat 😉
The app currently uses an expiring JWT to provide authentication. I could remove the requirement for the JWT to expire which would effectively remove any invalidation of your current "session". That change should be relatively simple to accomplish. Unfortunately my work-life schedule has ramped up this year and I am finding less and less time to maintain the few apps I've written so new requests like this may take some time (but you're quite welcome to contribute!). Thus refresh tokens/oauth is unlikely to get implemented. Also apologies it took me 18 days to see this. I keep meaning to turn on notifications for new issues but I keep forgetting!
I should probably take a couple of hours to provide some API documentation. I'll see if I can put some up in a wiki on this GitHub page for you.
My current plan is to finish the main functionality from the app and then potentially start contributing features/fixes back into this project so that both the web app and the mobile app can benefit.
For now, I am storing the username and password on the device in order to make a new authentication request when the current token expires. Using a mobile app that you have to login to every time is quite frustrating. In future hopefully i'll get some time to PR a better solution to this project :)
Some documentation would be great if you could get around to it, for now i've just been inspecting the requests that the web app makes in order to make the same calls from the app.
If you're interested in the app, current progress can be seen here: https://imgur.com/a/PuVSVZF Making everything work with the different user preferences was interesting... But progress is being made. Decided to just stick with the styling that the web app uses and replicate that as closely as I could. I'm definitely not good at design so doing it this way will definitely look better 😆
Thanks for replying, no worries about the delay, everyone's busy, i'm just doing this as a learning project for flutter on my commute to work. Nice app you've got here, clean and simple.
Hey, that looks pretty neat! Keep it up.