Skip to content
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

chore: upgrade to next 15 and add docs #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smakosh
Copy link

@smakosh smakosh commented Jan 10, 2025

What's new?

  • Upgraded to Next 15.1
  • Ran the codemod to update cookies as it became a promise
  • Removed unused imports
  • Added documentation
  • Make the submit button customizable by making it accept a title prop

Copy link

vercel bot commented Jan 10, 2025

@smakosh is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@Yuss9
Copy link

Yuss9 commented Jan 15, 2025

redirect function in createSession works for you ?

@smakosh
Copy link
Author

smakosh commented Jan 15, 2025

Yes works for me

Screen.Recording.2025-01-17.at.7.23.36.PM.mov

@Yuss9
Copy link

Yuss9 commented Jan 16, 2025

A bit weird, I'm on Nextjs15 and session have been created but the redirect on /dashboard doen't work I have this error

Error during user signup: Error: NEXT_REDIRECT
    at getRedirectError (webpack-internal:///(action-browser)/./node_modules/next/dist/client/components/redirect.js:48:19)
    at redirect (webpack-internal:///(action-browser)/./node_modules/next/dist/client/components/redirect.js:55:11)
    at createSession (webpack-internal:///(action-browser)/./src/app/_lib/session.ts:53:62)
    at async signup (webpack-internal:///(action-browser)/./src/app/[locale]/signup/actions.ts:75:9)
    at async /Users/huseyinyurtseven/Developer/123briconet/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:157:2088
    at async handleAction (/Users/huseyinyurtseven/Developer/123briconet/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:156:20457)
    at async renderToHTMLOrFlightImpl (/Users/huseyinyurtseven/Developer/123briconet/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:161:19013)
    at async doRender (/Users/huseyinyurtseven/Developer/123briconet/node_modules/next/dist/server/base-server.js:1568:34)
    at async responseGenerator (/Use

@smakosh
Copy link
Author

smakosh commented Jan 16, 2025

A bit weird, I'm on Nextjs15 and session have been created but the redirect on /dashboard doen't work I have this error

Error during user signup: Error: NEXT_REDIRECT
    at getRedirectError (webpack-internal:///(action-browser)/./node_modules/next/dist/client/components/redirect.js:48:19)
    at redirect (webpack-internal:///(action-browser)/./node_modules/next/dist/client/components/redirect.js:55:11)
    at createSession (webpack-internal:///(action-browser)/./src/app/_lib/session.ts:53:62)
    at async signup (webpack-internal:///(action-browser)/./src/app/[locale]/signup/actions.ts:75:9)
    at async /Users/huseyinyurtseven/Developer/123briconet/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:157:2088
    at async handleAction (/Users/huseyinyurtseven/Developer/123briconet/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:156:20457)
    at async renderToHTMLOrFlightImpl (/Users/huseyinyurtseven/Developer/123briconet/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:161:19013)
    at async doRender (/Users/huseyinyurtseven/Developer/123briconet/node_modules/next/dist/server/base-server.js:1568:34)
    at async responseGenerator (/Use

Did you add the SECRET env variable?

@Yuss9
Copy link

Yuss9 commented Jan 16, 2025

mhhh need to check this evening, I'm currently at work, I will get back to you this evening

@Yuss9
Copy link

Yuss9 commented Jan 17, 2025

Hello, after multiple test, it didn't work I added all missing secret, but nothing happen. Session cookie is created but i'am not redirected. Do you have an idea ?

@smakosh
Copy link
Author

smakosh commented Jan 17, 2025

Hello, after multiple test, it didn't work I added all missing secret, but nothing happen. Session cookie is created but i'am not redirected. Do you have an idea ?

Which Node version are you on? Also can you share your repo to check if it's something wrong in there.

@Yuss9
Copy link

Yuss9 commented Jan 17, 2025

Node 20, maybe we can make a call discord if you want, I'am free this evening

@smakosh
Copy link
Author

smakosh commented Jan 17, 2025

Node 20, maybe we can make a call discord if you want, I'am free this evening

Sure, add me at "smakosh"

@Yuss9
Copy link

Yuss9 commented Jan 17, 2025

I send you an invitation on discord

@smakosh
Copy link
Author

smakosh commented Jan 22, 2025

A bit weird, I'm on Nextjs15 and session have been created but the redirect on /dashboard doen't work I have this error

Error during user signup: Error: NEXT_REDIRECT
    at getRedirectError (webpack-internal:///(action-browser)/./node_modules/next/dist/client/components/redirect.js:48:19)
    at redirect (webpack-internal:///(action-browser)/./node_modules/next/dist/client/components/redirect.js:55:11)
    at createSession (webpack-internal:///(action-browser)/./src/app/_lib/session.ts:53:62)
    at async signup (webpack-internal:///(action-browser)/./src/app/[locale]/signup/actions.ts:75:9)
    at async /Users/huseyinyurtseven/Developer/123briconet/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:157:2088
    at async handleAction (/Users/huseyinyurtseven/Developer/123briconet/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:156:20457)
    at async renderToHTMLOrFlightImpl (/Users/huseyinyurtseven/Developer/123briconet/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:161:19013)
    at async doRender (/Users/huseyinyurtseven/Developer/123briconet/node_modules/next/dist/server/base-server.js:1568:34)
    at async responseGenerator (/Use

Make sure the redirect() is outside the try/catch.

That should work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants