-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] onLogin function does not work properly on vercel once deployed, but works on local development #1919
Comments
I think it has something to do with how the Server object is passed into the tokenHandler when logged locally I see the full server object but when logged on production it doesn't seem to get the Production:
Locally:
For some reason production builds don't have access to this? |
I think importing Patched this file
|
I also updated the
|
@CesarBenavides777 Thank you I will take a look. I remember we had to provide a workaround at one point in order to fix some build issues. I think Vercel is messing around with those runtimes. It does not make sense that this is happening. I will check your solution as well. |
FYI, I'm using experimental app router with the same dependencies listed here and am not having any issues on a production instance on vercel. Is there perhaps a vercel configuration that you @CesarBenavides777 has set that might be interfering here? We're not using any of the premium vercel features at this point. |
Maybe not using npm or yarn? Using bun currently |
I'm using yarn + corepack, node 20.x and have the same env vars set. I do have a monorepo, so my build + start look like:
|
I am experience the same issue when deploying to vercel, let me know if you find a fix! |
I have the same problem on Vercel and Netlify |
Something in the newer versions of the Faust packages is causing it to break. Downgrading to the packages below fixes the issue
|
Updated patches to
This is applied using With the changset above in a file called |
Everything at its latest version For my personal website: |
@theodesp any update on this? I'm pretty sure the changes I listed above make this fully compatible with Next 15. I would be happy to submit a PR too. |
Basically awaiting any cookie calls and importing NextResponse directly. |
Hey @CesarBenavides777 feel free to open a PR if you want! |
…ent - adding one more eslint addition (wpengine#1919)
…ent - updating example repo (wpengine#1919)
…ent - Adding use server on logout action(wpengine#1919)
Let me know if I need to change anything else. |
Description
As a user I want to be able to use the onLogin function to properly log in and see the my-account page using the
@faustwp/experimental-app-router
package. The implementation shown in the example directory does in fact work with local development as intended. But when deployed to production on vercel you get a:Steps to reproduce
.env
filebun dev
/login
page and log inAdditional context
Related Discord discussion:
https://discord.com/channels/836253505944813629/1233495010440122419
Vercel Error Logs:
@faustwp/core Version
^3.0.3
@faustwp/cli Version
^3.0.2
FaustWP Plugin Version
1.3.2
WordPress Version
6.5.5
Additional environment details
Deployed on Vercel
WordPress is on instaWP
Cookies have been confirmed to work across domains.
WPGraphQL JWT Auth does in fact break this because of a
wrong number of segments
FYILinks:
CMS: https://cms.cesarbenavides.com
Frontend: https://staging.cesarbenavides.com
Using the WPGraphQL CORS plugin for additional testing (doesn't work when installed or uninstalled)
Please confirm that you have searched existing issues in the repo.
The text was updated successfully, but these errors were encountered: