Comments (9)
@Thenkei maybe you included the useSessionSetupMethod
in your environment.js
instead of ember-cli-build.js
?
This is the only reason I can think of and it'd explain why adding the code to the load
function works for you.
from ember-simple-auth.
@Thenkei If it's not working then it's a bug.
But notice that useSessionSetupMethod
is imported from a file that's created during build time - this was the only way to expose build time variable to runtime that we could think of.
The load
function on the other hand is for loading environment configs.
from ember-simple-auth.
@Thenkei Glad it worked out
Why don't you let both way to configure the addon ?
The reason for this is that useSessionSetupMethod
will funnel out ApplicationRoute
when set to true and there's no easy way to read environment configuration from within ember-cli-build.
We also need to funnel it out because otherwise it causes issues for typescript users as well as embroider.
Hopefully I cleared out the question for you.
The PR and linked issues might also be able to answer this #2318
from ember-simple-auth.
Hi, thanks for reporting this as well as the reproduction ❤️
This feature currently is optional since 4.1.0 and requires additional configuration inside ember-cli-build.js
file in order to get rid of the deprecation.
Later on we plan to make it the default behaviour.
Here's the documentation for this:
https://github.com/simplabs/ember-simple-auth/blob/master/guides/upgrade-to-v4.md
from ember-simple-auth.
Hello @BobrImperator,
This feature currently is optional since 4.1.0 and requires additional configuration inside ember-cli-build.js file in order to get rid of the deprecation.
I might be wrong but this config is not loaded for now.. I think you missed the load function that should override the useSessionSetupMethod
value.
When it should be
load(config) {
this.rootURL = config.rootURL !== undefined ? config.rootURL : DEFAULTS.rootURL;
this.routeAfterAuthentication =
config.routeAfterAuthentication !== undefined
? config.routeAfterAuthentication
: DEFAULTS.routeAfterAuthentication;
// Here is the missing line
this.useSessionSetupMethod = config.useSessionSetupMethod;
},
from ember-simple-auth.
But notice that useSessionSetupMethod is imported from a file that's created during build time - this was the only way to expose build time variable to runtime that we could think of.
It make sense (at first glance I didn't get the 'ember-simple-auth/use-session-setup-method' import). It's weird in this case I should have an issue in my build process I will try to dig.
In the other hand, I tried my change (on the load function) and it works.
from ember-simple-auth.
@BobrImperator you're totally right.
Inside your ember-cli-build.js you'll need to add useSessionSetupMethod flag and set it to true:
I missed that one. Why don't you let both way to configure the addon ? I found this quite confusing since the rest of the config is done in the environment.js
.
Anyway, thanks for your time.
from ember-simple-auth.
Thanks for this really clear answer. I got it now.
Thanks again.
Kind regards
from ember-simple-auth.
I'm closing this since it looks like the issue has been resolved.
Feel free to re-open in case it's not resolved.
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
- 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
- ESA's Application route hides host app's route when using pod layout & embroider HOT 5
- 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.