https://supertokens.com/ logo
s

shorthair_[]

06/09/2022, 12:30 PM
Copy code
function loginHandler(){
      if (email == '' || password == ''){
      console.log('Cant upload without variables')
      } else {
        fetch("http://127.0.0.1:8000/auth/signin", {
          method: 'POST',
          headers:{"Content-Type":"application/json"},
          body:JSON.stringify( {
            "formFields" : [
              {
                "id" : "email",
                "value" : {email}
              },
              {
                "id": "password",
                "value": {password}
              }
            ]
          }
          

        )})
        .then(res => {
          if (res.ok){
            console.log('Signed In!')
          } else {
            console.log("Couldn't Sign In :(")
          }
          
        }).catch(console.log('Something is off'));
        console.log('logging in')
        console.log(email)
        console.log(password)
r

rp

06/09/2022, 12:30 PM
hey @shorthair_[]
let's talk in this thread
@nkshah2 can help here
s

shorthair_[]

06/09/2022, 12:31 PM
hey rp!!
n

nkshah2

06/09/2022, 12:32 PM
Hi, Can you change your catch block to
Copy code
.catch(e => {console.log(e)})
And see what it prints out?
s

shorthair_[]

06/09/2022, 4:47 PM
alright
ill try it out
i saw the error
network request failed
could this be related to the supertokens?
n

nkshah2

06/10/2022, 4:00 AM
Can you enable debug logs on your backend and post the output?