saasykits / next-lucia-auth

This is a Next.js T3 project with authentication implemented using Lucia.
https://next-lucia.vercel.app
MIT License
471 stars 59 forks source link

Server actions issues #50

Closed firstaxel closed 6 months ago

firstaxel commented 6 months ago

Describe the bug A clear and concise description of what the bug is Error with the server actions used for auth in the template.

To Reproduce Steps to reproduce the behavior:

  1. Go to auth page
  2. And try to login or sign up
  3. See error

Expected behavior A clear and concise description of what you expected to happen. I am getting async await error await are supposed to be used in async functions I tried to find out the issues but I think it is directly from the functions itself

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Fr3akyMurk commented 6 months ago

This seems like an error i used to have, please send the error log that you get, don't just say "I have an error on login" as that is not enough information for us to process.

Furthermore, what database do you use, is this on a local machine or up on vercel?

firstaxel commented 6 months ago

sorry for the misdirection the error gets displayed as i trigger the auth server actions from the auth related pages, including login, register , even the forget password pages, i used a local database and this is on my local machine
Screenshot from 2024-03-10 19-43-44

this is the screenshot i got from my browser and from my code editor Screenshot from 2024-03-10 19-43-19

Fr3akyMurk commented 6 months ago

Refer to this issue.

This app was made to use planetscale and be hosted on vercel not with local db's in mind. (this method only supports mysql and is not really tested for long periods but it will solve your issues)

firstaxel commented 6 months ago

Thanks very much the error is gone finally