Skip to content

Fix VTA SSO authorize host for tenant subdomains#423

Open
ethriel3695 wants to merge 18 commits intonextfrom
reuben/fix-vta-sso-authorize-subdomain
Open

Fix VTA SSO authorize host for tenant subdomains#423
ethriel3695 wants to merge 18 commits intonextfrom
reuben/fix-vta-sso-authorize-subdomain

Conversation

@ethriel3695
Copy link
Copy Markdown

@ethriel3695 ethriel3695 commented Apr 16, 2026

Summary

  • route the VTA SSO OAuth authorize request through the tenant subdomain instead of always using www.chromatic.com
  • reuse the same subdomain rewrite for the verification URL so the SSO device flow stays on the same tenant host
  • add a regression test covering both the SSO and default sign-in paths

How to QA

  1. Run yarn vitest run src/utils/requestAccessToken.test.ts --reporter=verbose.
  2. In Storybook while signed out of the Visual Tests addon, open the panel and click Sign in with SSO.
  3. Enter an SSO tenant subdomain such as storybook and continue.
  4. Complete the SSO flow in the popup and confirm the addon proceeds to project selection or the linked-project state instead of showing a failed authentication/projects error.
  5. Repeat the standard Sign in with Chromatic flow and confirm the non-SSO path still uses the default host successfully.

@ethriel3695 ethriel3695 added the bug Classification: Something isn't working label Apr 16, 2026
@ethriel3695 ethriel3695 self-assigned this Apr 16, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 6.90%. Comparing base (28e7c37) to head (06f2772).

Additional details and impacted files
@@           Coverage Diff            @@
##            next    #423      +/-   ##
========================================
+ Coverage   6.50%   6.90%   +0.40%     
========================================
  Files        166     166              
  Lines      14164   14164              
  Branches     305     316      +11     
========================================
+ Hits         921     978      +57     
+ Misses     13163   13109      -54     
+ Partials      80      77       -3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ethriel3695 ethriel3695 added minor Auto: Increment the minor version when merged release Auto: Create a `latest` release when merged labels Apr 16, 2026
@ethriel3695
Copy link
Copy Markdown
Author

@copilot resolve the merge conflicts in this pull request

Co-authored-by: ethriel3695 <12070791+ethriel3695@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI commented May 5, 2026

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in commit 1befaf1. The branch was behind origin/main by several commits (version bumps to 5.1.2, CHANGELOG updates, and a sidebar fix). The merge was clean — no actual conflicts in the changed files (requestAccessToken.ts / requestAccessToken.test.ts). All tests still pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Classification: Something isn't working minor Auto: Increment the minor version when merged release Auto: Create a `latest` release when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants