Bug: Sign-in and sign-out are completely broken without JS #477

Open
opened 2026-04-16 07:10:32 +00:00 by jjalangtry · 0 comments
jjalangtry commented 2026-04-16 07:10:32 +00:00 (Migrated from github.com)

Problem

`signIn('google')` and `signOut()` in `AuthButton.tsx` are pure JS event handlers — no anchor, no form action. Without JS, users cannot sign in or sign out at all.

Affected File

`next/components/nav/AuthButton.tsx` (lines 117–127)

Fix

NextAuth ships a built-in HTML sign-in page at `/api/auth/signin` that works with zero JS. Use it as the fallback:

```html

\`\`\`
## Problem \`signIn('google')\` and \`signOut()\` in \`AuthButton.tsx\` are pure JS event handlers — no anchor, no form action. **Without JS, users cannot sign in or sign out at all.** ## Affected File \`next/components/nav/AuthButton.tsx\` (lines 117–127) ## Fix NextAuth ships a built-in HTML sign-in page at \`/api/auth/signin\` that works with zero JS. Use it as the fallback: \`\`\`html <!-- sign-in fallback --> <noscript><a href="/api/auth/signin">Sign In</a></noscript> <!-- sign-out fallback --> <noscript> <form action="/api/auth/signout" method="POST"> <button type="submit">Sign Out</button> </form> </noscript> \`\`\`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
SSE/WebsiteTheSSEquel#477
No description provided.