-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ember.SimpleAuth conflict with Ember.PersistenceFoundation on "session" injection #159
Comments
Not sure whether Ember has a strategy for conflicting injections. Right now the only solution would be to fork one of the 2 libraries and rename the injected property in the entire codebases. Maybe you can get in contact with the core team and find out whether there's something planned to solve that or some suggested strategy for 3rd party injections in general? |
Hi, As Ember-Simple auth is much smaller than EPF, maybe we could rename "session" to "auth-session". this would make it much easier also for other users (I've always found it confusing to have a name "session"). What do you think? |
Why do you find the name "session" to be confusing? Because that's what Ember.SimpleAuth's session actually is (by being a replacement for a server side session which doesn't exist in Ember apps). I don't think renaming is not really a good idea - I'd rather come up with a short guide on how to rename it manually if there's a conflict (resolving the conflict with EPF doesn't mean the next conflict couldn't come up soon thereafter). |
The fact that it's using a common English name ("session") will without doubt causes more and more conflicts in the future. Having a short guide about how to rename is not a solution I think. If you need to rename all your injections before starting a project, that's going to be a whole mess. The solution is easy: just reducing the chance for conflict to appear by using more targeted name. So EPF should maybe use "data-session", Ember-Simple Auth "auth-session". This way the name is "kind of" namespaced, and there is really few chance to encounter another "auth-session" (because you likely don't use two auth libraries altogether). |
Hi, Last week, after create this issue, I have try to rename simpleAuth session object with success. (This is much easier than rename epf stuff) So, I changed the container registration name to "sessionAuth:main" and the inject field to "sessionAuth", both are in conflict with epf. I have commited in a fork at https://github.com/ncoquelet/ember-simple-auth |
@bakura10 I have read somewhere, that ember have injection conflict solution, but as ember beginner i don't know all ember possibilities. Otherwise, epf team suggest that maybe could be resolved by runtime configuration ... thanks both of you |
I added a "namespace" to the names that Ember.SimpleAuth registers its components with and made the name of the session property configurable: f2d94a8 |
Work nice |
Hi,
I start using Ember.SimpleAuth and it's an amazing library ! Well documented and very extensible.
On my projet, I also use Ember persistence foundation (EPF), but I am very bad problem.
Each use an injected object call "session" into the route ...
Do you have a idea to rename session object in SimpleAuth ?
Thanks
The text was updated successfully, but these errors were encountered: