[Fixed]-Can I manually set session state to authenticated in embe simple auth?

1👍

You cannot set the ESA session to authenticated manually. Actually any attempt to write the isAuthenticated property should result in an error.

What you can do is to implement a custom authenticator and use that to authenticate the session with some static data that you pass to the authenticate method, e.g.

this.get('session').authenticate('authenticator:my-authenticator', sessionData)

// app/authenticators/my-authenticator.js
…
authenticate(sessionData) {
  return Ember.RSVP.resolve(sessionData);
}

Leave a comment