Guard Google login and conditionally provide OAuth#258
Open
SaintSampo wants to merge 2 commits into
Open
Conversation
Render the IDE instead of blocking on the OAuth client ID fetch, which left the page stuck on "Loading Google authentication..." whenever GOOGLE_AUTH_URL was unset or the auth backend was unreachable. Skip the Google login button when no auth backend is configured: mounting useGoogleLogin with an empty client ID throws and takes down the file tree panel that hosts the widget.
SaintSampo
force-pushed
the
GoogleAuthFallback
branch
from
July 22, 2026 16:01
83a6ba4 to
ebc390b
Compare
Collaborator
Author
|
This morning we discussed how recent changes by Frank might impact this PR. I just went through and updated this branch so it is consistent with Main. I tested the feature this PR adds and everything looks good. |
Replace static environment variable check with a React Context that holds the OAuth client ID fetched from the auth backend at runtime. This allows the Login component to wait until the client ID is actually available before rendering, rather than relying on build-time configuration. The component will render the login button only when the ID has been successfully fetched, preventing errors from Google's GSI client.
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.
Add an error boundary in src/components/folder-tree.tsx and wrap the Login component to avoid crashes if the Google auth widget errors at render time.