Comments (5)
Oh, now I see what you mean, after I added useSessionSetupMethod
to ember-cli-build.js
, it worked fine.
Perhaps this should be mentioned in the readme, not just in migration guide? Didn't know about this step until you mentioned it.
Feel free to close this issue. Thanks.
from ember-simple-auth.
Hello @vlascik
ESA has implemented a way to strip away the file already, but it's not the default just yet as we're still supporting mixins until v5.
Please take a look at these guides https://github.com/simplabs/ember-simple-auth/blob/master/guides/upgrade-to-v4.md
Implementing this should fix your embroider issue and typescript.
Let me know if it happens to fix the issue for you.
I'm also currently working on embroider support in ESA and I'd expect it to be included yet in v4 or already in v5.
from ember-simple-auth.
Hi @BobrImperator, yes I've seen it, I'm calling this.session.setup()
in my application route already - the problem is, that in this specific scenario (pods + embroider), ESA's empty route file overrides my app's route file in the build output, and breaks the app.
Adding files to addon's app
folder is probably not a good idea unless it's just a typical helper/service reexport, the ESA's empty route file probably doesn't belong there - the need for it either should only be mentioned in docs (which it already is), or the file should only be created in host app's directory via post-ember install generate
command, because as it is, the only way to fix this issue is by deleting node_modules/ember-simple-auth/app/routes/application.js
file after every npm/yarn install.
However, this might be a breaking change and require a new major.
Not sure if I made the problem clear enough.
from ember-simple-auth.
@vlascik ESA will definitely remove the file as it was also reported that it caused problems with typescript.
The file was added in the ancient times for initializer works reliably when ESA was mounting a beforeModel hook on it.
This will be removed in V5 as I mentioned.
What you said is clear to me, but we can't remove this without a major release as you've mentioned.
I also asked if you're using the session method, because this file should already be stripped away during build and so it shouldn't cause anymore trouble - it fixed build issues for projects that use typescript and it's weird that it still breaks for embroider.
Could you make sure that you're configuring ESA inside your ember-cli-build.js
so it removes the file?
https://github.com/simplabs/ember-simple-auth/blob/master/packages/test-app/ember-cli-build.js
from ember-simple-auth.
Thanks for checking this out for me 🙏
from ember-simple-auth.
Related Issues (20)
- Expected Error format when login fails HOT 7
- DEPRECATION: The <(unknown):ember362>#host computed property was just overridden.
- Deprecation: `old-deprecate-method-paths` HOT 1
- Ember Simple Auth: The automatic session initialization is deprecated on Ember 3.28.4 HOT 9
- Is Torii addon abandonned ? HOT 9
- Ember 4.1.0: Use of `assign` has been deprecated. Please use `Object.assign` or the spread operator instead. HOT 1
- Unhandled Promise error detected when using the manual session.setup function HOT 9
- When I logout of one tab the authenticated data still seems to be populated in another tab HOT 1
- React to authentication in a component via modifier HOT 2
- v2 addon format HOT 6
- Typescript error on accessing prohibitAuthentication HOT 3
- CookieStore is not initializing/syncing correctly HOT 2
- Dependency Dashboard
- CookieExpirationTime not being set HOT 2
- When syncing tabs (session store), schedule of the refresh token should be updated
- ember-polyfills.deprecate-assign deprication in Ember 4.4 HOT 2
- Action Required: Fix Renovate Configuration
- Access token does not persist HOT 1
- Neither of test apps work - did you stop maintaining it? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-simple-auth.