0

Here's the base authenticator for Ember.SimpleAuth, which includes an authorize method that one must override:

http://ember-simple-auth.simplabs.com/ember-simple-auth-api-docs.html#Ember-SimpleAuth-Authenticators-Base

I get "this.store is undefined" when calling this.store in the authorize method. Basically, I just want to look the user up (using the store) after they've been authorized.

Marc
  • 3,812
  • 8
  • 37
  • 61
  • One option would be to use `App.__container__.lookup("store:main")`. I don't know that plugin very well so I'm not sure this is the greatest solution, but you'll find the store. Also substitute App with your apps namespace. – bmeyers May 21 '14 at 08:06

1 Answers1

1

You can either add an initializer that injects the store into your custom initializer (you shouldn't modify Authenticators.Base directly but extend it if you need customization) or you can add a property to the session that gets the authenticated user like in this example: https://github.com/simplabs/ember-simple-auth/blob/master/examples/4-authenticated-account.html#L101

marcoow
  • 4,062
  • 1
  • 14
  • 21