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

Feature/multiple device #128

Merged
merged 26 commits into from
Apr 3, 2024
Merged

Feature/multiple device #128

merged 26 commits into from
Apr 3, 2024

Conversation

curtwl
Copy link
Collaborator

@curtwl curtwl commented Mar 30, 2024

Description

Adds support for users logging in from multiple devices by changing refreshToken to a scalar array. Login now checks to see if the user has a refresh token in the current device's cookies, and if so, replaces the existing token instead of adding a new one.

Issue link

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • [] Feature updates / changes
  • Tests
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Aside from updating the e2e tests, I also tested by logging in as Jessica from 3 different browsers and spamming the login and refresh routes with Swagger, to confirm that tokens are replaced instead of growing the array indefinitely.

Checklist:

  • My code follows the style guidelines of this project
  • [x ] I have performed a self-review of my code
  • [x ] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • [x ] New and existing tests pass locally with my changes
  • [ x] Any dependent changes have been merged and published in downstream modules
  • [x ] I have updated the change log

Copy link
Collaborator

@cherylli cherylli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working for me locally, and all tests passed. Just need to resolve some conflicts 🚀

@cherylli cherylli assigned cherylli and unassigned cherylli Mar 30, 2024
Copy link
Collaborator

@timDeHof timDeHof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! All tests passed locally. Also I have followed your test directions in both chrome and firefox. After that, I checked pgadmin saw the jessica had two refresh tokens.

@curtwl curtwl merged commit d66fe65 into dev Apr 3, 2024
1 check passed
@curtwl curtwl deleted the feature/multiple-device branch April 3, 2024 01:27
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

Successfully merging this pull request may close these issues.

3 participants