leighton-tidwell / devexe

0 stars 0 forks source link

Spike - Next.js Auth with Discord #11

Closed leighton-tidwell closed 2 years ago

leighton-tidwell commented 2 years ago

Investigate how authorization with Next.js and Discord will logically work. We may be able to take advantage of frameworks such as next-auth.

Do other possibilities exist? How does it look in code to use next-auth or another possibility?

leighton-tidwell commented 2 years ago

According to this: https://github.com/nextauthjs/next-auth/issues/1535 - when using next-auth if we wanted to do server side validation for logging in, it can cause significant performance loss. So if we went this route, they have a workaround where the first page load is server side (and displays a loading indicator) and every one after that is checked on the client. https://next-auth.js.org/getting-started/client#custom-client-session-handling

leighton-tidwell commented 2 years ago

I think our best route forward with this is going to be using next-auth with client side session handling.