Hi guys, I have a quick question. Sometimes when ...
# help
l
Hi guys, I have a quick question. Sometimes when I login with 'supabase.auth.signIn()'I get a 'Bad Request' Error. Does anyone know what is the reason for this?
n
Hello @LosBopfos! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
j
You might need to open a support request for that
n
LosBopfos (2022-05-16)
l
After some trial and error I found the problem. My login component was doing the redirect in the '' through the 'action' attribute. For some reason this causes the login to not work every now and then. My solution now was to perform the redirect through 'window.location.href = "..."' in my own 'logIn()' function. Maybe this should be mentioned in the documentation somehow?
n
Thread was archived by @LosBopfos. Anyone can send a message to unarchive it.
j
That’s default html behaviour. Did you remove the preventDefault by any chance?
l
No, I added preventDefault() only after I noticed that the redirect of the from was causing the problem. By the way, in the doc for NextJS no form is used.