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

🪟 🎉 Log out if a user logs out of another tab #21766

Merged
merged 4 commits into from
Jan 27, 2023

Conversation

teallarson
Copy link
Contributor

@teallarson teallarson commented Jan 24, 2023

What

closes https://github.com/airbytehq/airbyte-cloud/issues/3735

Previously, a user could click in the UI and end up with an error screen if they logged out in another tab.
Now, we log out and redirect to sign-in screen immediately if user logs out in another tab

How

Firebase already watches for updates consistently, so added a check in our Service for a logged in user. If there is none, tell the reducer.

The flow for automatically logging in from another tab is proving a bit touchier and thus will be solved in a separate PR as it requires some more digging.

Recommended reading order

  1. the one and only

Testing

Manual testing:

  1. Log in
  2. Open another tab
  3. Log out in one of the tabs
  4. You should be logged out in that tab
  5. The other tab should be logged out too

@octavia-squidington-iv octavia-squidington-iv added the area/frontend Related to the Airbyte webapp label Jan 24, 2023
@teallarson teallarson marked this pull request as ready for review January 24, 2023 13:33
Copy link
Contributor

@josephkmh josephkmh left a comment

Choose a reason for hiding this comment

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

Tested again locally, and worked as expected 👍

@teallarson teallarson enabled auto-merge (squash) January 27, 2023 14:52
@teallarson teallarson merged commit 2310503 into master Jan 27, 2023
@teallarson teallarson deleted the teal/auth-on-tab-change branch January 27, 2023 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants