[PR #18] [MERGED] fix: resolve first-time wizard not displaying for new users (#13) #38

Closed
opened 2026-10-15 13:01:51 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/wolfmanager/pull/18
Author: @salty2011
Created: 6/7/2025
Status: ✅ Merged
Merged: 6/7/2025
Merged by: @salty2011

Base: stable ← Head: fix/first-time-wizard-not-displaying


📝 Commits (6)

  • dcbd5b3 fix: resolve first-time wizard not displaying for new users (#13)
  • 22d52b3 debug: Add comprehensive diagnostic logging for UNAUTHORIZED client data error
  • 4d789a8 Fix: Resolve NextAuth UNAUTHORIZED error for remote network access
  • fc88e0c Docs: Adding updated technical information for the auth and session maangement
  • e33c52e security: upgrade Next.js to 14.2.25
  • c14b18b fix: sidebar logout not redirecting to login screen

📊 Changes

21 files changed (+1162 additions, -550 deletions)

View changed files

📝 docs/README.md (+4 -0)
➕ docs/technical/authentication-architecture.md (+458 -0)
➕ docs/technical/authentication-quick-reference.md (+100 -0)
📝 next-env.d.ts (+1 -1)
📝 package.json (+5 -3)
📝 pnpm-lock.yaml (+260 -203)
📝 src/app/actions/api-test-actions.ts (+1 -1)
📝 src/app/actions/docker-actions.ts (+1 -1)
📝 src/app/actions/wolf-actions.ts (+39 -5)
📝 src/app/api/auth/[...nextauth]/route.ts (+2 -1)
📝 src/app/clients/actions.ts (+21 -5)
📝 src/app/dashboard/page.tsx (+2 -1)
📝 src/app/first-time-setup/actions.ts (+4 -1)
📝 src/app/first-time-setup/components/first-time-wizard.tsx (+46 -210)
📝 src/app/first-time-setup/page.tsx (+7 -14)
📝 src/app/login/components/login-client.tsx (+1 -1)
📝 src/app/page.tsx (+5 -21)
📝 src/components/auth/login-form.tsx (+1 -1)
📝 src/components/layout/sidebar.tsx (+26 -2)
📝 src/lib/auth.ts (+68 -10)

...and 1 more files

📄 Description

  • Fix NextAuth redirect callback to handle first-time setup flow
  • Add middleware enforcement for first-time setup requirements
  • Update login forms to use proper callback URLs
  • Ensure consistent redirects to /clients instead of /dashboard
  • Improve wizard completion flow and error handling

Fixes issue where new users with default passwords were not being redirected to the first-time setup wizard after login.

Changes made:

  • src/lib/auth.ts: Updated redirect callback to check first-time setup status
  • src/middleware.ts: Added enforcement for first-time setup requirements
  • src/components/auth/login-form.tsx: Fixed callback URL handling
  • src/app/login/components/login-client.tsx: Updated redirect logic
  • src/app/first-time-setup/page.tsx: Improved redirect destinations
  • src/app/first-time-setup/actions.ts: Enhanced password update actions
  • src/app/first-time-setup/components/first-time-wizard.tsx: Better wizard flow
  • src/app/page.tsx: Added logging for debugging
  • src/app/dashboard/page.tsx: Redirect to /clients instead of dashboard

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/wolfmanager/pull/18 **Author:** [@salty2011](https://github.com/salty2011) **Created:** 6/7/2025 **Status:** ✅ Merged **Merged:** 6/7/2025 **Merged by:** [@salty2011](https://github.com/salty2011) **Base:** `stable` ← **Head:** `fix/first-time-wizard-not-displaying` --- ### 📝 Commits (6) - [`dcbd5b3`](https://github.com/games-on-whales/wolfmanager/commit/dcbd5b3cdfdb8706e26b3576672605ed78449f6a) fix: resolve first-time wizard not displaying for new users (#13) - [`22d52b3`](https://github.com/games-on-whales/wolfmanager/commit/22d52b3a7fe44afc6a5b9ae876ffd65c573fd47d) debug: Add comprehensive diagnostic logging for UNAUTHORIZED client data error - [`4d789a8`](https://github.com/games-on-whales/wolfmanager/commit/4d789a81a48404769e5a17134d6a709308ee60ab) Fix: Resolve NextAuth UNAUTHORIZED error for remote network access - [`fc88e0c`](https://github.com/games-on-whales/wolfmanager/commit/fc88e0ce91adaef6b44d09d41191286fd34cc212) Docs: Adding updated technical information for the auth and session maangement - [`e33c52e`](https://github.com/games-on-whales/wolfmanager/commit/e33c52e50aad87bd44b8e0e1790c6b289a548716) security: upgrade Next.js to 14.2.25 - [`c14b18b`](https://github.com/games-on-whales/wolfmanager/commit/c14b18b8a4f2c1228fd6e6db5c89925275e94056) fix: sidebar logout not redirecting to login screen ### 📊 Changes **21 files changed** (+1162 additions, -550 deletions) <details> <summary>View changed files</summary> 📝 `docs/README.md` (+4 -0) ➕ `docs/technical/authentication-architecture.md` (+458 -0) ➕ `docs/technical/authentication-quick-reference.md` (+100 -0) 📝 `next-env.d.ts` (+1 -1) 📝 `package.json` (+5 -3) 📝 `pnpm-lock.yaml` (+260 -203) 📝 `src/app/actions/api-test-actions.ts` (+1 -1) 📝 `src/app/actions/docker-actions.ts` (+1 -1) 📝 `src/app/actions/wolf-actions.ts` (+39 -5) 📝 `src/app/api/auth/[...nextauth]/route.ts` (+2 -1) 📝 `src/app/clients/actions.ts` (+21 -5) 📝 `src/app/dashboard/page.tsx` (+2 -1) 📝 `src/app/first-time-setup/actions.ts` (+4 -1) 📝 `src/app/first-time-setup/components/first-time-wizard.tsx` (+46 -210) 📝 `src/app/first-time-setup/page.tsx` (+7 -14) 📝 `src/app/login/components/login-client.tsx` (+1 -1) 📝 `src/app/page.tsx` (+5 -21) 📝 `src/components/auth/login-form.tsx` (+1 -1) 📝 `src/components/layout/sidebar.tsx` (+26 -2) 📝 `src/lib/auth.ts` (+68 -10) _...and 1 more files_ </details> ### 📄 Description - Fix NextAuth redirect callback to handle first-time setup flow - Add middleware enforcement for first-time setup requirements - Update login forms to use proper callback URLs - Ensure consistent redirects to /clients instead of /dashboard - Improve wizard completion flow and error handling Fixes issue where new users with default passwords were not being redirected to the first-time setup wizard after login. Changes made: - src/lib/auth.ts: Updated redirect callback to check first-time setup status - src/middleware.ts: Added enforcement for first-time setup requirements - src/components/auth/login-form.tsx: Fixed callback URL handling - src/app/login/components/login-client.tsx: Updated redirect logic - src/app/first-time-setup/page.tsx: Improved redirect destinations - src/app/first-time-setup/actions.ts: Enhanced password update actions - src/app/first-time-setup/components/first-time-wizard.tsx: Better wizard flow - src/app/page.tsx: Added logging for debugging - src/app/dashboard/page.tsx: Redirect to /clients instead of dashboard --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 13:01:51 +00:00
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
games-on-whales/wolfmanager#38
No description provided.