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: reset user info while logging out #197

Merged
merged 1 commit into from
Sep 30, 2021
Merged

Conversation

raulb
Copy link
Member

@raulb raulb commented Sep 30, 2021

Description of change

In the process of logging out, we should make sure we all reset user information in meroxa's configuration file. Otherwise, even when logging back in as a new user, information such as email, uuid and feature flags remained the same.

Type of change

  • New feature
  • Bug fix
  • Refactor
  • Documentation

Demo

Before this pull-request

❯ meroxa config       
Using meroxa config located in "path"
...
access_token: old..token
actor: [email protected]
actor_uuid: old-uuid
refresh_token: old..token
user_feature_flags: my-feature-flag
...

❯ meroxa logout
Successfully logged out.

❯ meroxa config       
Using meroxa config located in "path"
...
access_token: 
actor: [email protected]
actor_uuid: old-uuid
refresh_token: 
user_feature_flags: my-feature-flag
...

❯ meroxa login 
You will now be taken to your browser for authentication or open the url below in a browser.
...
Successfully logged in.

❯ meroxa config       
Using meroxa config located in "path"
...
access_token: new...token
actor: [email protected]
actor_uuid: old-uuid
refresh_token: new...token
user_feature_flags: my-feature-flag
...

❯ meroxa whoami       
[email protected]

❯ meroxa config       
Using meroxa config located in "path"
...
access_token: new...token
actor: [email protected]
actor_uuid: new-uuid
refresh_token: new...token
user_feature_flags: my-other-feature-flag
...

After this pull-request

❯ meroxa config       
Using meroxa config located in "path"
...
access_token: old..token
actor: [email protected]
actor_uuid: old-uuid
refresh_token: old..token
user_feature_flags: my-feature-flag
...

❯ meroxa logout
Successfully logged out.

❯ meroxa config       
Using meroxa config located in "path"
...
access_token: 
actor: 
actor_uuid:
refresh_token: 
user_feature_flags:
...

❯ meroxa login 
You will now be taken to your browser for authentication or open the url below in a browser.
...
Successfully logged in.

❯ meroxa config       
Using meroxa config located in "path"
...
access_token: new...token
actor: [email protected]
actor_uuid: new-uuid
refresh_token: new...token
user_feature_flags: my-other-feature-flag
...

@raulb raulb requested a review from lovromazgon September 30, 2021 11:08
@raulb raulb self-assigned this Sep 30, 2021
Copy link
Member

@lovromazgon lovromazgon left a comment

Choose a reason for hiding this comment

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

👍

@raulb raulb merged commit e358ea3 into master Sep 30, 2021
@raulb raulb deleted the raul/remove-userinfo-logout branch September 30, 2021 11:18
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