【发布时间】:2017-06-05 20:11:19
【问题描述】:
我开始让 torri 和 emberfire 为登录页面工作,但是当我尝试将其与 ember simple auth 一起使用时,我收到错误:
TypeError: Converting circular structure to JSON
at JSON.stringify (<anonymous>)
at Class.persist (local-storage.js:45)
at Class.persist (adaptive.js:163)
at Class._callStoreAsync (internal-session.js:132)
at Class._updateStore (internal-session.js:207)
at Class._setup (internal-session.js:156)
at internal-session.js:61
at tryCatch (ember.debug.js:50180)
at invokeCallback (ember.debug.js:50195)
at publish (ember.debug.js:50163)
不确定是错误还是我遗漏了需要设置的内容。做了一个快速的 repo,它显示了我的问题 https://github.com/tobias-g/ember-simple-auth-firebase,其中 diff https://github.com/tobias-g/ember-simple-auth-firebase/commit/02882f4db3a0320d4ac314d2e92192ac522470f8 显示了我添加的内容以尝试让 ember simple auth 工作。
DEBUG: -------------------------------
DEBUG: Ember : 2.13.3
DEBUG: Ember Data : 2.13.1
DEBUG: Firebase : 3.9.0
DEBUG: EmberFire : 0.0.0
DEBUG: jQuery : 3.2.1
DEBUG: Ember Simple Auth : 1.3.0
DEBUG: -------------------------------
【问题讨论】:
-
您知道,Firebase 拥有自己的身份验证系统,该系统已经使用 Torii。我不知道你的用例是什么,但我发现 ember-simple-auth 和 Firebase 是多余的。 github.com/firebase/emberfire/blob/master/docs/guide/…
-
是的,我在第一次提交时得到了 firebase 身份验证工作正常,但我想将 ember-simple-auth DataAdapterMixin 用于我的模型,将 AuthenticatedRouteMixin 用于路由。如果我不能修复它,我猜我必须在没有 mixins 的情况下自己处理这个问题,并且可能需要编写更多样板代码。
标签: firebase ember.js ember-simple-auth emberfire