blitz: Toolkit: Authenticate and RedirectTo not working as expected
What is the problem?
Using the latest toolkit .60.
Home.authenticate = { redirectTo: Routes.LoginPage() }
Doesn’t seem to do anything. Have confirmed nothing in the application Tab in dev tools.
Also
LoginPage.redirectAuthenticatedTo = Routes.Home()
Seems to create the following error, when authenticated and hitting the page:
Run blitz -v
and paste the output here:
Blitz version: 2.0.0-alpha.53 (global)
Blitz version: 2.0.0-alpha.60 (local)
macOS Monterey | darwin-arm64 | Node: v18.4.0
Package manager: npm
System:
OS: macOS 12.4
CPU: (10) arm64 Apple M1 Pro
Memory: 556.45 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.4.0 - ~/.nvm/versions/node/v18.4.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.4.0/bin/yarn
npm: 8.12.1 - ~/.nvm/versions/node/v18.4.0/bin/npm
npmPackages:
@prisma/client: Not Found
blitz: Not Found
next: Not Found
prisma: Not Found
react: Not Found
react-dom: Not Found
typescript: Not Found
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 19 (15 by maintainers)
Just did a fresh install of blitz and ran into the hydration mismatch error reported above, was able to fix it by upgrading to react and react-dom to v18.2.0
If using typescript however, you will also need to upgrade to next 18.2.0, since error messages around the
<style jsx global>
will other wise persist.Can you open a different issue for this?