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

feat(frontend): add signout when authIdentity is nullish #3892

Conversation

AntonioVentilii
Copy link
Collaborator

Motivation

As suggested by @DenysKarmazynDFINITY , we include function nullishSignOut in the check for authIdentity inside LoaderUserProfile.

@AntonioVentilii AntonioVentilii requested a review from a team as a code owner December 7, 2024 01:45
Copy link
Member

@peterpeterparker peterpeterparker left a comment

Choose a reason for hiding this comment

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

We should probably not do this change here as it can lead to a race condition where sign out might happens twice or more?

Use click on "Logout".
Logout function reset auth identity. (it reloads the window but let's assume here for some reason the window is not reloaded)
Auth identity is null.
Subscriber start.
Auth identity is null.
Logout function call.
Logout function reset identity.
etc.

In other words, we should maybe not use nullishSignOut in an observable that uses $authIdentity because the former impacts the later?

@AntonioVentilii
Copy link
Collaborator Author

Agreed! PR closed

@AntonioVentilii AntonioVentilii deleted the feat(frontend)/add-signout-when-authIdentity-is-nullish branch December 9, 2024 09:12
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.

2 participants