spa5k / nextjs_approuter_electron

This is a template for building Electron apps with Next.js App router, SSR and Server Components
https://www.saybackend.com/blog/03-electron-nextjs-ssr
60 stars 8 forks source link

How to use next-auth? #8

Closed Mebius1916 closed 2 weeks ago

Mebius1916 commented 2 weeks ago

Hello, this example does not seem to support next-auth. I used next-auth on this example and it can start normally. However, after packaging it into an application, it will show that next-auth cannot connect normally. I want to know what the problem is.

spa5k commented 2 weeks ago

No idea, this is just a template, rest needs to be checked and fixed yourself.

notwatermango commented 2 days ago

Tried iron session too, not working.

Mebius1916 commented 2 days ago

也尝试了 iron 会话,不起作用。

Now I gave up using next's ssr in electron. I extracted the next part of nextron into a web page and packaged it with pake, which solved my needs.

spa5k commented 2 days ago

The problem is likely happening with the redirect URLs and how you are storing it, it's doing nothing new, the server is still running etc, in order to send the callbacks to electron, you will need to implement electron direct URL, then it can work.

spa5k commented 2 days ago

Also why will you be setting up the backend in the electron itself since it will run locally, if you want to save cookies etc, then it can work normally