Repository navigation
Allow OAuth signup through invitation links - #812
Merged
thomiceli merged 2 commits intoOct 16, 2026
Merged
Conversation
thomiceli
added a commit
to arunkls-rbrk/opengist
that referenced
this pull request
Oct 19, 2026
Resolve the conflict in oauth_test.go with the invitation tests from thomiceli#812 by keeping both subtests. Those tests leave DisableSignup enabled, so the re-authentication subtest now resets it before registering through OIDC.
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.
Context
A valid invitation unlocks the password registration page when signup is disabled, but that invitation context was lost as soon as the user chose OAuth. The OAuth callback then treated the user as an ordinary disabled-signup attempt and redirected back to login.
Fixes #798.
Changes
User impact
Invited users can now complete OAuth/OIDC registration while public signup remains disabled. Users without a usable invitation continue to be rejected.
Verification
TestOIDCLoginPKCE; before the fix it stopped at/-/logininstead of/oauth/register.mockoidcHTTP provider through discovery, authorization, token exchange, and userinfo, backed by SQLite with a cookie jar, PKCE, and CSRF-protected registration POST. It verifies both the blocked no-invitation path and successful invited account creation/invitation consumption.go test ./internal/web/handlers/auth -run '^TestOIDCLoginPKCE$' -count=1— passed.go test ./internal/web/handlers/auth -count=1— passed.go vet ./internal/web/handlers/auth— passed.golangci-lint v2.12.0 run --timeout=20m --disable=errcheck— 0 issues.npm ci, Vite production build, and embedded Windows backend build — passed.go test ./... -p 1 -count=1— all modified and relevant handler packages passed, including API v1, auth, gist, health, metrics, and settings. The repository-wide run still reports unrelated Windows failures in CLI log-file cleanup, Git symlink/default-branch assumptions, and Git HTTP authentication behavior; representativeinternal/gitfailures reproduce on untouchedmaster.