Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centralize login information #303

Open
patrickfeltes opened this issue Feb 17, 2020 · 1 comment
Open

Centralize login information #303

patrickfeltes opened this issue Feb 17, 2020 · 1 comment
Labels

Comments

@patrickfeltes
Copy link
Member

Right now, the login flow happens over SplashScreenActivity and LoginActivity. It would probably be better to figure out how to have some sort of central login flow where it is easier to understand what happens when (JWT refreshing, etc), and also allows for unit testing.

This also doesn't currently handle the case of a JWT expiring while the app is in the background (making all requests afterwards fail). Even though this would be a rare occurrence (and could be fixed via force quitting the app), we should still try to handle it more gracefully.

This will definitely require some thought, so it is best that we try to do this after the event is over.

@patrickfeltes
Copy link
Member Author

patrickfeltes commented Feb 21, 2020

My initial thought for JWT refreshing was to add an interceptor that first parses the JWT to see if it's expired and then runs refresh before the call. Based on this: https://stackoverflow.com/questions/22450036/refreshing-oauth-token-using-retrofit-without-modifying-all-calls
we should not use Interceptor for this. Should investigate more about why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant