Here is my code:
"ember-simple-auth": "^1.6.0"
"ember-cli": "^3.1.4"
export default ActiveModelAdapter.extend(DataAdapterMixin, {
host: ENV.APP.API_HOST,
authorizer: 'authorizer:devise',
...
How can I fix deprecation warning ?
Here is my code:
"ember-simple-auth": "^1.6.0"
"ember-cli": "^3.1.4"
export default ActiveModelAdapter.extend(DataAdapterMixin, {
host: ENV.APP.API_HOST,
authorizer: 'authorizer:devise',
...
How can I fix deprecation warning ?
I have fixed this issue. See the examples in the documentation.
authorize(xhr) {
let { email, token } = this.get('session.data.authenticated');
let authData = `Token token="${token}", email="${email}"`;
xhr.setRequestHeader('Authorization', authData);
}
Use above code instead of authorizer: 'authorizer:devise'
.