NeoLegends / velocity-pwa

🚴‍♂️💨 An alternative https://velocity-aachen.de/menu
3 stars 3 forks source link

Switch to JWT based auth #48

Closed Empty2k12 closed 4 years ago

Empty2k12 commented 4 years ago

In preparation for supporting smart-locks, whose API is only available in JWT based routes.

NeoLegends commented 4 years ago

I like this! Perhaps the fetch-wrapping methods could catch the timeouted token, and then transparently do a refresh and retry the fetch. I think this would be the best way. It would just cause some additional delay here and there, but that would be it.

I think we use the isAuthed check to determine whether to show the users the account pages or whether to show a login form there.