make next argument optional when using authenticate = { redirectTo: '' }
- Dominant language
- TypeScript
- Stars
- 14.1k
- Forks
- 803
- PR merge metrics
- No merged PRs in 30d
Description
### What do you want and why?
Sometimes when using `Page.authenticate = { redirectTo: Routes.HomePage() }` it's not necessary to keep the current page path in the next argument. One example of this is when logging out. Once the user logs out and we want to redirect to the home page, we don't really care when you came before that. The next argument is valid when trying to go to an authenticated page but you're not logged in. In that case you'd want to remember where you were going before showing the login
### Possible implementation(s)
Maybe just add an extra option to the `authenticate` when using it with redirectTo so then it could be checked here https://github.com/blitz-js/blitz/blob/de874ca20e1e2b03e61013fbc5e64a784d28cc30/nextjs/packages/next/stdlib/blitz-app-root.tsx#L159
### Additional context
Contributor guide
Assessment
This issue has not been assessed yet.