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

Fixes issue where Auth emulator sign in with Google only shows default tenant #6683

Merged
merged 3 commits into from
Jan 16, 2024

Conversation

aalej
Copy link
Contributor

@aalej aalej commented Jan 12, 2024

Description

As mentioned here, "other tenants than the default using the Google Auth Provider are not being listed in the popup sign-in screen". This may be because the link created looks like http://127.0.0.1:9099/emulator/auth/handler?<other_query>&tid=second. The link has a query of tid not tenantId

We are currently looking for the tenantId query.

const tenantId = req.query.tenantId as string | undefined;

Given that we may be using tenantId in the past(or other sdks), keeping both instead of replacing tenantId with tid might be a better option

Scenarios Tested

See https://github.com/aalej/issues_5623-tid for a test case

Using the Auth emulator and Hosting emulator

  1. Sign in with "default" tenant
  2. Sign out
  3. Sign in with "second" tenant
    1. Users from the "default" must not be displayed
  4. Sign out
  5. Sign in with "default" tenant
    1. Only users from the "default" must be displayed
  6. Sign out
  7. Sign in with "second" tenant
    1. Only users from the "second" must be displayed

Sample Commands

firebase emulators:start --project <project_id>

@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (6b0cb5d) 54.18% compared to head (97d535a) 54.18%.
Report is 1 commits behind head on master.

Files Patch % Lines
src/deploy/hosting/convertConfig.ts 0.00% 1 Missing and 1 partial ⚠️
src/emulator/auth/handlers.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6683      +/-   ##
==========================================
- Coverage   54.18%   54.18%   -0.01%     
==========================================
  Files         347      347              
  Lines       24130    24132       +2     
  Branches     4976     4978       +2     
==========================================
  Hits        13075    13075              
- Misses       9855     9856       +1     
- Partials     1200     1201       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aalej aalej requested a review from joehan January 12, 2024 12:00
Copy link
Contributor

@joehan joehan left a comment

Choose a reason for hiding this comment

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

🔥, thanks Alej!

@aalej aalej merged commit 56285cb into master Jan 16, 2024
35 checks passed
@aalej aalej deleted the aalej-auth-em-tid branch January 17, 2024 15:06
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.

3 participants