Closed WhatzzUp closed 7 years ago
I found the problem:
In the file "io.driver.js"
node_modules\@mean-expert\loopback-component-realtime\dist\drivers\io.driver.js
changed line 122 from
var AccessToken = _this.options.app.models.AccessToken;
to
var AccessToken = _this.options.app.models.extendedAccessToken;
and now it works.
Any idear, how to set a custom AccessToken without changing this line?
@WhatzzUp thanks for verifying... Currently there is no custom access token implementation, but I think is easy to implement....
Actually... If you help me test if my idea works would be awesome....
You need to change that line of code for the following:
var AccessToken = _this.options.custom && _this.options.custom.AccessToken
? _this.options.app.models[_this.options.custom.AccessToken]
: _this.options.app.models.AccessToken;
And then in the server/component-config.json
"@mean-expert/loopback-component-realtime": {
"debug": false,
"auth": true,
"custom": {
"AccessToken": "extendedAccessToken"
}
.....
}
Let me know if that works, I'm assuming it will... If does I can publish a patch including that code.
Cheers Jon
@jonathan-casarrubias thank you so much for your quick responses!
It works like a charm! :tada:
And once again many thanks @jonathan-casarrubias!
@jonathan-casarrubias will this "feature" released in the future? :)
Hello guys,
we created a custom AccesToken model "extendendAccessToken" and remove the old "AccesToken" from the "model-config.json"
Our "model-config.json"
After a user successfully logged in, the server throw the following error message:
If we add the standard "AccessToken" model back to the "model-config.json" everything works correct. What is necessary to use our custome AccesToken model instead of the standard AccessToken?
Cheers
Chris