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

Expire the refresh token only after the created authentication token has been used once #207

Open
guruz opened this issue May 22, 2019 · 3 comments

Comments

@guruz
Copy link

guruz commented May 22, 2019

Forgive me if I use the wrong terms here, this is something that came up here on Monday in office with @ogoffart and @michaelstingl and @jnweiger and @ckamm

This is to avoid a situation where the reply from the server with the new authentication token gets lost but we can't use the refresh token for a second time because the server already invalidated it.

On usage of the refresh token, the server could create a new authentication token but still keep the refresh token valid to be used again. Only when the new authentication token was used by the client we know that the client properly received the new authentication token and the server can invalidate the fresh token.

@michaelstingl
Copy link

@DeepDiver1975 could you shed some light on the matter?

@lefherz
Copy link

lefherz commented Jan 20, 2020

Could this be related to owncloud/android#2685 ? Not sure if I understand the different tokens correctly, but some refresh tokens seem to have gone missing there. So maybe that's one of the consequences of refresh tokens getting invalidated too early?

@DeepDiver1975
Copy link
Member

Refresh token themselves have no expiry (yet).
Refresh tokens do get removed as soon as they are once used to recreate an access token and a new refresh token. (And when the client is removed via the settings .... but this seems to be not the case here)

The described scenarios can only happen in cases where tokens are refreshed but the new refresh token is not properly stored and the old once continues to be used,,,,,

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

No branches or pull requests

4 participants