You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add remove_account() API, and it will signout the account from the app family. This PR will close#12 .
Most of the implementations are refactoring the underlying cache helpers. To review high level "what does it do" logic, please focus on only 50 lines starting from here (half of them are inline documentation).
Thanks @SomkaPe for reviewing this PR promptly. I'm also documenting the summary of the code review conversations below for future reference.
[5/10 3:19 PM] Petro Somka
is there any api review pr for it?
i mean is there some description of logic
[5/10 3:22 PM] Ray Luo
API review PR for the remove_account() behavior is the internal PR 775 I sent out weeks ago, about the sign-out-of-app or sign-out-of-family.
Now this actual implementation do the sign out of family.
[5/10 3:22 PM] Petro Somka
ok
[5/10 3:28 PM] Petro Somka
why do you not remove idTokens in _sign_out() ?
[5/10 3:32 PM] Ray Luo
I believe id_token are intrinsically more close to accounts, so I only do it in _forget_me().
[5/10 3:33 PM] Petro Somka
_forget_me() and _sign_out() are private , and only removeAccount() is public which just call _forget_me()
[5/10 3:34 PM] Ray Luo
Yes
In that sense, whether removing IDT happens in signout() or in forget_me(), does not really matter right now.
It would matter in the future if our entire org agree to officially provide public api for signout() and forget_me(). At that time we would need to precisely define and agree on their behaviors.
[5/10 3:31 PM] Petro Somka
one more question if you remove account realm - independently It also means that get Accounts api returns accounts realm independently as well , correct ?
[5/10 3:33 PM] Ray Luo
Yes, I believe get_account should return all accounts regardless of their realms.
[5/10 3:35 PM] Petro Somka
but not returning same account twice if there are few account in the cache with diff realms
(1 liked)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add remove_account() API, and it will signout the account from the app family. This PR will close #12 .
Most of the implementations are refactoring the underlying cache helpers. To review high level "what does it do" logic, please focus on only 50 lines starting from here (half of them are inline documentation).