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

Fix/auth refactor current user handling into service #150

Conversation

c0rydoras
Copy link
Collaborator

@c0rydoras c0rydoras commented May 14, 2024

MitanOmar and others added 3 commits May 14, 2024 10:51
Writing instances of JS classes directly to the `data` property
of the ember simple auth service is problematic, because ember
simple auth always saves the _serialized_ form of the class in
local storage. In our case, this caused issues when the application
is open in multiple tabs, and on tab triggers a token refresh: In that
case, the initialization of the class instance is not triggered, and the
serialized data is read directly from local storage.

This refactors the current implementation to use a separate service, as
suggested by the ember-simple-auth docs:
https://github.com/mainmatter/ember-simple-auth/blob/master/guides/managing-current-user.md
@c0rydoras c0rydoras added bug Something isn't working frontend This issue or pull request is frontend related labels May 14, 2024
@c0rydoras c0rydoras self-assigned this May 14, 2024
@c0rydoras c0rydoras requested a review from a team as a code owner May 14, 2024 08:51
@c0rydoras c0rydoras merged commit ea7910b into adfinis:main May 14, 2024
9 checks passed
@c0rydoras c0rydoras deleted the fix/auth-refactor-current-user-handling-into-service branch May 14, 2024 08:57
@c0rydoras c0rydoras linked an issue May 14, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend This issue or pull request is frontend related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

session service is not return user info with ember data model
3 participants