nuxt-alt / auth

An alternative module to @nuxtjs/auth
https://nuxt-alt-auth.vercel.app/
MIT License
113 stars 20 forks source link

Local strategy keeps making backend request without any data #23

Closed azmatzuberi closed 1 year ago

azmatzuberi commented 1 year ago

I've set up my local strategy with the correct backend URL and method, but it keeps getting a 400 error while no data was even sent. In the network tab it shows no payload. I've been playing around with this for some time now and can't figure out why this 400 error keeps persisting even though I've passing the username and password using the loginWith function.

Screenshot 2023-02-02 at 1 41 35 PM
hendrikheil commented 1 year ago

Are you passing the payload correctly?

Your method call should look like this:

    await auth.loginWith('myStrategy', {
      body: {
        email: 'my@e.mail',
        password: 'hunter2',
      },
    });