assert.js:36 Mirage: Your Ember app tried to POST '/users/sign_in',
but there was no route defined to handle this request. Define a route
that matches this path in your mirage/config.js file. Did you forget
to add your namespace?
I allow all requests to localhost:3000/api/v1 to passthrough so mirage isn’t an issue with most requests.
However, I am not sure where my app is making this POST request to. Is it localhost:4200?
Does my server need to have a /users/sign_in endpoint? And if so, does it need to handle this request somehow? I feel like that should be built in to ember-simple-auth since that’s kind of the point of using a 3rd party for this sort of thing.
Yes, from my understamding you need this endpoint or you configure your authenticator in /authenticator/my-authenticator.js to point to an existing endpoint.
But I’m not sure if this is correct as i’m having trouble my self with the csrf token atm
If you are using ember-simple-auth then the default serverTokenEndpoint is ‘/users/sign_in’, however if you want to use some other end point, you might have to roll down your own custom authenticator.
Or you can use ember-simple-auth-token as Bauke mentioned, and set the end point as:
serverTokenEndpoint: 'http://localhost:3000/api/v1/your-custom-url/'
In both the cases the server is supposed to create a session and return either the session data or a token containing the session data with a success status code.