ReviewOS

also looking at this

stacks/reportshq

fix(auth): send people to their reports, and make a dead redirect fail the build

#34
Merged glennmichael123 wants to merge fix/auth-redirects into main
5 files +59 -16
resources/views/register.stxmodified+2-2
Changes to resources/views/register.stx
@@ -17,7 +17,7 @@ const signedIn = session.user !== null
1717 {{-- Already signed in: bounce before anything paints, the same way the
1818 guard does in the other direction. --}}
1919 @if (signedIn)
20 <script>window.location.replace('/projects')</script>
20 <script>window.location.replace('/reports')</script>
2121 @endif
2222
2323 <script>document.documentElement.setAttribute('data-session-cookie', {{ cookieName }})</script>
@@ -130,7 +130,7 @@ const signedIn = session.user !== null
130130 if (res.ok) {
131131 // replace, not assign: the back button should not return to a sign-in
132132 // form the person has already used.
133 window.location.replace('/projects')
133 window.location.replace('/reports')
134134 return
135135 }
136136