我正在尝试建立一个新的微光蛋应用程序,并试图设置ESA与devise集成。
除了使用devise身份验证器之外,我正在按照演练进行操作。
@action
async authenticate() {
let { identification, password } = this;
try {
await this.session.authenticate('authenticator:devise', identification, password);
} catch (error) {
this.errorMessage = error.error || error
}
}
在调用session.authenticate的过程中,我看到的是在查找authenticator的过程中出现了一个错误,设置了一些未知的ember属性。
TypeError: Cannot set property '__OWNER__ember1589293697731192541050875__' of undefined
at Object.setOwner (index.js:80)
at Proxy._lookupAuthenticator (internal-session.js:228)
at Proxy.authenticate (internal-session.js:31)
at Class.authenticate (session.js:168)
at LoginController.authenticate (login.js:44)
都没到调用后台认证的地步,身份和密码都设置好了,我也找不到我的代码有什么问题。有什么好办法吗?
我错过了演练中的一个步骤,我需要在本地创建一个appauthenticators文件夹,并在其中扩展devise身份验证器。回到正轨!