-
Notifications
You must be signed in to change notification settings - Fork 313
breaking: make waitlist var opt-in #614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,7 +87,7 @@ const AppRoutes = ({ initData }: { initData: InitData }) => { | |
| }) | ||
|
|
||
| const oidcMode = isOidcMode() | ||
| const shouldBypassWaitlist = import.meta.env.VITE_BYPASS_WAITLIST === 'true' || isPrPreview() | ||
| const waitlistEnabled = import.meta.env.VITE_ENABLE_WAITLIST === 'true' && !isPrPreview() | ||
|
|
||
| return ( | ||
| <Routes> | ||
|
|
@@ -107,22 +107,22 @@ const AppRoutes = ({ initData }: { initData: InitData }) => { | |
| /> | ||
| )} | ||
|
|
||
| {/* Waitlist routes - unauthenticated only (skip when bypass or OIDC mode) */} | ||
| {!oidcMode && !shouldBypassWaitlist && ( | ||
| {/* Waitlist routes - unauthenticated only (only when enabled and not OIDC mode) */} | ||
| {!oidcMode && waitlistEnabled && ( | ||
| <Route element={<AuthGate require="unauthenticated" redirectTo="/" />}> | ||
| <Route path="waitlist" element={<WaitlistLayout />}> | ||
| <Route index element={<WaitlistPage />} /> | ||
| </Route> | ||
| </Route> | ||
| )} | ||
|
|
||
| {/* Main app routes - authenticated only (pass-through when bypass enabled) */} | ||
| {/* Main app routes - authenticated only (pass-through when waitlist and OIDC both disabled) */} | ||
| <Route | ||
| element={ | ||
| shouldBypassWaitlist ? ( | ||
| <Outlet /> | ||
| ) : ( | ||
| oidcMode || waitlistEnabled ? ( | ||
| <AuthGate require="authenticated" redirectTo={oidcMode ? '/oidc-redirect' : '/waitlist'} /> | ||
| ) : ( | ||
| <Outlet /> | ||
| ) | ||
| } | ||
|
Comment on lines
120
to
127
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When If "waitlist disabled" and "auth not required" are genuinely the same thing for all deployment types, this is fine. But if there are deployments that want auth without the waitlist UI, the two concerns need to be separated (e.g. a separate |
||
| > | ||
|
Comment on lines
+119
to
128
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When If the intent is that the backend always enforces auth and the frontend gate is purely for the waitlist UX, this is fine. If any production environment was relying on the frontend auth gate as a default, upgrading without setting |
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.