Going to the webpage should redirect to `/dashboard` for signin users
Right now if a user goes to the main website, it goes to the signed out page which doesn't have any obvious call to actions for contributing. They can click the "dashboard" link in the user dropdown but it's not totally obvious.
Fixes might be:
- Have an obvious call to action for signed in users
- Redirect to
/dashboardfor signed in users
I'm working on it!
My take would be this...
User is not authenticated:

User is authenticated:

Is there someway we can redirect the user to /dashboard when they're authenticated? I feel like that'd be the smoothest flow and reduce the number if button clicks needed.
Should be a pretty easy thing to do.
We have NextAuth.js useSession() hook to determine if user is authenticated. Then we could use NextJS useRouter() hook and push the /dashboard route.
That sounds most ideal!
Actually in the Signin function, there is a Redirect callback callbackUrl defined as /dashboard. By default only URLs on the same URL as the site are allowed, so either I added http://localhost:3000/dashboard or I add the redirect callback to [...nextauth].ts so that the baseUrl is appended to the callbackUrl.
The signin flow is working correctly. The part we need to fix is when an already signed in user goes directly to the website. When that happens they won't go through the signin and redirect flow, instead they'd land at /.
So @Klotske's solution would be the most appropriate. When a signed in user lands at / we should automatically redirect them to /dashboard.