Quantcast
Viewing all articles
Browse latest Browse all 4826

Issue authenticating user session using ember-simple-auth

@gattra wrote:

I am trying to authenticate a user session after he/she log in. I call the following in my route to do this:

this.get('session').authenticate(authenticator, user.email, user.password).catch((reason) => {
  this.set('errorMessage', reason.error || reason);
});

Which throws the error:

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.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4826

Trending Articles