HomeMusing Studio

Enforce signup checks consistently across all registration paths

Description

Enforce signup checks consistently across all registration paths

Previously, registration eligibility (closed registration, invite
validity, and password-auth availability) was checked inconsistently
depending on the endpoint, including /api/auth/signup, /oauth/signup,
and instances with password auth disabled.

Funnels all paths (web, API, OAuth) through a single canRegister() gate so
the checks can't be bypassed by picking a different endpoint, and includes
the invite code in the OAuth signature. Extends the invite validation from
#1724 to the API and OAuth paths it didn't cover. Also adds regression
tests covering each path.

Details

Provenance
mattAuthored on Thu, Aug 20, 2:03 PM
Parents
rWFaa0143148ebc: Merge pull request #1712 from writefreely/dependabot/github_actions/docker/logi…
Branches
Unknown
Tags
Unknown
References
refs/pull/1748/head, fix-signup-paths