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

Generate refresh token #3137

Closed
13 tasks done
Tracked by #2049
VakarisZ opened this issue Mar 23, 2023 · 0 comments · Fixed by #3222
Closed
13 tasks done
Tracked by #2049

Generate refresh token #3137

VakarisZ opened this issue Mar 23, 2023 · 0 comments · Fixed by #3222
Labels
Complexity: Medium Feature Issue that describes a new feature to be implemented. Impact: Critical
Milestone

Comments

@VakarisZ
Copy link
Contributor

VakarisZ commented Mar 23, 2023

Generate our own refresh token:

We could generate a token that's exactly the same as the authentication token, but with an extended lifespan (we need to use a custom TimestampSigner that uses not the current time, but current time + REFRESH_TIMEDELTA as its timestamp). The only difference between the authentication token and the refresh token would be that the refresh token has a longer lifespan. Then, we would add another endpoint.

Tasks:

  • Create a refresh token (0d) @VakarisZ
  • Modify login and registration to return refresh token (0d) @VakarisZ
  • Add an endpoint that allows you to login with a refresh token
  • Make a refresh token distinct from access token @VakarisZ
  • Add logic to the agent to use the refresh token (0d) - @shreyamalviya
  • Adjust the times for refresh and authentication token (0d) @VakarisZ
  • Redesign refresh strategy (1.25d)
    • BB test to verify old tokens are invalid after refresh
    • Add expiration time to all responses with tokens
    • Modify the agent to use the new scheme
    • Make the agent's HTTPIslandAPIClient to be multiprocessing-safe @cakekoa
    • Add logic to the UI to use the refresh token @ilija-lazoroski
  • Cleanup vulture allowlist
@VakarisZ VakarisZ added Feature Issue that describes a new feature to be implemented. Impact: Critical Complexity: Medium labels Mar 23, 2023
@mssalvatore mssalvatore added this to the v2.1.0 milestone Mar 28, 2023
VakarisZ added a commit that referenced this issue Mar 31, 2023
This change means that the user will be able to be AFK for at most 17 minutes 59 seconds before getting logged out. Refresh token being 3 minutes means that the user has to be AFK at least 3 minutes to get logged out.

Issue: #3137
ilija-lazoroski added a commit that referenced this issue Apr 3, 2023
ilija-lazoroski added a commit that referenced this issue Apr 3, 2023
ilija-lazoroski added a commit that referenced this issue Apr 3, 2023
ilija-lazoroski added a commit that referenced this issue Apr 3, 2023
ilija-lazoroski added a commit that referenced this issue Apr 3, 2023
ilija-lazoroski added a commit that referenced this issue Apr 3, 2023
mssalvatore pushed a commit that referenced this issue Apr 3, 2023
mssalvatore pushed a commit that referenced this issue Apr 4, 2023
ilija-lazoroski added a commit that referenced this issue Apr 12, 2023
ilija-lazoroski added a commit that referenced this issue Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Medium Feature Issue that describes a new feature to be implemented. Impact: Critical
Projects
None yet
2 participants