- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的开发盒上连接了电子邮件,并在创建用户后收到验证电子邮件。我可以单击包含的链接,它会将我带到我的主页。
1) 单击链接似乎会进行一些处理,因为它会重定向到/,但不会更改用户帐户上的已验证标志。
2)它似乎忽略了我的 Accounts.config 设置,并且仅在我显式调用时才有效
token = Accounts.sendVerificationEmail(userId)
详细信息:
mrt --version
Meteorite version 0.6.11
Release 0.6.5.1
mrt list --using
standard-app-packages
preserve-inputs
less
coffeescript
iron-router
foundation
http
moment
email
spin
roles
accounts-base
accounts-password
accounts-ui
服务器/lib/account.coffee
Accounts.config
sendVerificationEmail: true
forbidClientAccountCreation: true
服务器方法:
Meteor.startup ->
create_user = (options) ->
console.log('create_user: ' + options.username)
userId = Accounts.createUser options
# should not be necessary, but I get email only when included
token = Accounts.sendVerificationEmail(userId)
Meteor.methods({ create_user: create_user })
上面调用后,mongo 显示:
emails: [ { "address" : "jim@less2do.com" , "verified" : false}]
and
email: { "verificationTokens" : [ { "token" : "N3sLEDMsutTbjxyzX" , "address" : "jim@less2do.com" , "when" : 1.380616343673E12}]}
获取默认电子邮件:
Hello,
To verify your account email, simply click the link below.
http://localhost:3000/#/verify-email/N3sLEDMsutTbjxyzX
Thanks.
点击上面的链接即可:
http://localhost:3000/
但 mongo 数据库没有变化。
我期待通过处理的帐户密码/#/verify-email/N3sLEDMsutTbjxyzX 拉入某些内容,并更新用户文档。
accounts-base.js 尝试使用
match = window.location.hash.match(/^\#\/verify-email\/(.*)$/);
但是此时位置哈希为空。
我是否遗漏了一些需要手动设置路线的内容?我使用铁路由器会毁掉东西吗?以防万一,
Router.map ->
this.route 'home',
path: '/'
this.route 'inboxes'
this.route 'availability'
this.route 'find-agent'
this.route 'inbox-tour'
this.route 'availability-tour'
this.route 'find-agent-tour'
this.route 'inbox',
path: '/inbox/:_id'
data: () ->
m = Messages.findOne this.params._id
m._markRead()
fixed = _.map m.history.versions, (msg) =>
msg.left = (msg.author is 'offer')
msg.body = msg.body.replace( /[\r\n]+/g, "<br>")
msg
m.history.versions = fixed
Session.set 'messageVersions', fixed
m
waitOn: db.subscriptions.messages
loadingTemplate: 'loading'
notFoundTemplate: 'notFound'
this.route 'register',
this.route 'requested',
this.route 'blog',
this.route 'test',
this.route 'aboutUs'
Router.configure
layout: 'layout'
notFoundTemplate: 'notFound'
loadingTemplate: 'loading'
renderTemplates:
'footer': { to: 'footer' }
'sidebar': { to: 'sidebar' }
### Commented to rule out this routine
before: ->
routeName = @context.route.name
debugger
# no need to check at these URLs
#, etc
return if _.include(["request", "passwordReset","register", "tour"], routeName)
return if _.intersection(routeName.split('-'), ["tour"]).length > 0
return if routeName.indexOf('verify-email') != -''
user = Meteor.user()
unless user
#@render (if Meteor.loggingIn() then @loadingTemplate else "/")
if Meteor.loggingIn()
console.log('still logging in, no user, to ' + @loadingTemplate)
@render @loadingTemplate
console.log('!render ' + @loadingTemplate + ' completed' )
else
console.log('no user, / from router over ' + @loadingTemplate)
@render "home"
@stop()
###
谢谢!
最佳答案
显然,iron 路由器和路径中包含 hashbang 的 URL 存在一个已知问题,就像通过电子邮件生成的那样:
https://github.com/EventedMind/iron-router/issues/3
我建议你尝试实现与用户 samhatoum 所说的相同的解决方案(小心,我认为自从他将代码放在 RootController 中的 extends
方法上后,已经更改为 extend
.
关于Meteor 帐户电子邮件验证失败有两种方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19112450/
我在尝试在 Meteor.com 上托管的经历非常复杂。 我经常收到“此网站已关闭。稍后再试。”。一开始我不知道为什么,但后来我怀疑问题是我不小心恢复了“system.users”集合造成的。我尝试在
我有点好奇,与复制 Meteor 应用程序、启动 tmux session 并仅运行 meteor 相比,Meteor Up(或其他 Meteor 应用程序部署过程,如 Modulus)是否能做任何花
我与meteor 合作创建了一个应用程序。在 meteor Meteor.methods 和 Meteor.publish 用于执行数据库操作。 I know use of Meteor method
我有一个相当大的 meteor 项目并安装了几个 meteor 包。我这样做只是为了试用一个 meteor 包,看看它是否适用于我的项目。不幸的是,在确定我不需要在我的项目中安装这些包后,我没有卸载这
对于生产为什么我应该“捆绑” meteor 应用程序而不仅仅是复制 服务器上的源使用“ meteor ”命令? 基本上有什么区别: “meteor bundle app.tar.gz”,然后安装正确版
我是 Meteor 的新手,我想知道我们如何要求用户在创建帐户时上传他的图片?我正在使用基本的 Meteor 帐户来创建用户帐户。我希望用户能够上传他的图片,并且还能够在他登录时和在我网站的登录页面上
我正在学习 Meteor Angular 2 教程。在第 6 步,我随机尝试了“ meteor 更新”,这使我的样本崩溃了。更新有效,服务器正在启动。然而,浏览器屏幕现在保持空白,并且在控制台中出现错
在我的 meteor app我需要实现表格排序。现在我正在做的是设置一个 session variable对于每个列并根据要排序的项目切换其值。 任何人都可以提出更好的选择吗? 最佳答案 我推荐 表格
我向用户发送了注册电子邮件,当他输入密码和其他详细信息时,我试图重置密码,但它抛出错误 uncaught error extpected to find a document to change 正如
我运行排行榜示例。然后我更改了 leaderboard.js 中的 names 变量(Meteor.startup 函数参数初始化的一部分)中的科学家条目之一并保存了文件。 我应该期待 meteor
我有一个 meteor 1.0 应用程序。我添加了一堆包,例如:meteor add kevohagan:ramda .但我在任何地方都找不到它。我什至无法在我的系统上找到它。 在我的项目中: $>
我有一个 meteor 移动应用程序在结构上工作;我真的需要将 View 与一些页面转换拼接在一起。 我看了iron-transitioner项目,但看起来开发已经停止? (最后一次提交 6 个月前,
我在“发现 meteor ”一书之后构建了我的第一个 meteor 添加。 但是我现在遇到了以下错误: 错误:在ian:accounts-ui-bootstrap-3 中没有找到accounts_ui
是否可以在负载均衡器后面使用 Mongodb 运行 meteor 应用程序的多个实例? 似乎如果一个应用程序的多个实例在不同的服务器上运行,那么它们就不会知道其他实例对 Mongo DB 所做的更改
我在/client/main.coffee 中的新客户端代码 Xingyun = Meteor.connect "localhost:3000" System = new Meteor.Collect
在 Meteor.publish ,使用 this.error 有什么区别并简单地抛出 Meteor.Error ? 最佳答案 this.error仅在发布方法内可用。每 the docs : Sto
假设我想在 Meteor 的后端使用与 Mongo 不同的数据库,并且还想在前端使用像 D3.js 这样的可视化库。 目前有可能吗? 如果不是我自己添加它会有多复杂? 谢谢 最佳答案 https://
我已经在 Meteor 中制作了一个 watch-as-I-type 实时聊天服务,但是我在 Meteor 中的内置元素保存功能方面遇到了麻烦。基本上,当输入的文本具有焦点时,我需要不更新当前的聊天消
我想知道 Meteor 是否可以与我的用例一起使用。 我有一个可在 App Store 上使用的移动应用程序。这个应用程序包含一个小调查,用户将在没有互联网连接的情况下做出回应。然后用户将关闭应用程序
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 8年前关闭。 Improve this q
我是一名优秀的程序员,十分优秀!