Unified auth dialog with token and sign-in modes#207
Merged
Conversation
Create a consolidated AuthDialog component that supports both authenticated mode (username/password) and public mode (direct token via URL params). Workspace info is fetched using the admin token and passed in URL params to avoid permission issues with scoped JWTs. Updated authentication hooks to read credentials from URL params, and API routes to support both session auth and token-based auth via headers. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The scoped JWT doesn't have permission to read /v1/workspace. Now the workspace name from URL params is also passed as X-Tinybird-Workspace header to the API, which uses it directly instead of trying to fetch. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add token/host header check in middleware to allow public mode requests - Update /api/auth to return authenticated:true when token headers present - Decode JWT to extract workspace name as fallback in /api/config - Pass token/host headers when checking auth status in use-login - Use devMode: false for token-based client to avoid branch mode Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
gnzjgo
approved these changes
Feb 10, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Consolidated authentication into a single
AuthDialogcomponent supporting both authenticated mode (username/password) and public mode (direct Tinybird token via URL params). Workspace information is fetched using the admin token before creating the scoped JWT, avoiding permission issues.Changes
AuthDialogcomponent with tabbed interface for both auth modesuseLoginhook to read credentials from URL search paramsuseWorkspacehook to display workspace info from URL paramsX-Tinybird-TokenandX-Tinybird-Hostheaders🤖 Generated with Claude Code