Can't login a user

TypeError : Expected “token” to match “[^/]+?”, but got “” is the error i am getting when trying to login a user and can’t figure out what’s the problem. please help

Hey @hervelo! :wave:

It will be difficult to help you with only those information.

Please, give use some code or even a repository to reproduce your issue.

1 Like

Where is the code? Are you using Authentication module? Is any way that you can share your code?

Logging in a user is done like this

async login({request, auth}){

const {email, password} = request.all()

// For session based Auth
await auth.attempt(email, password)

// JWT
var token = auth.attempt(email, password)
}