I have an email connected to my dev block and get a confirmation email after creating the user. I can click on the included link and it will lead me to my main page.
1) Clicking on the link seems to do some processing, as it redirects to / but does not change the checked flag in the user account.
2) It seems that it ignores my Accounts.config parameter and only works when explicitly called
token = Accounts.sendVerificationEmail(userId)
Details:
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
Server / Lib / account.coffee
Accounts.config sendVerificationEmail: true forbidClientAccountCreation: true
server method:
Meteor.startup -> create_user = (options) -> console.log('create_user: ' + options.username) userId = Accounts.createUser options
After the above, mongo shows:
emails: [ { "address" : " jim@less2do.com " , "verified" : false}] and email: { "verificationTokens" : [ { "token" : "N3sLEDMsutTbjxyzX" , "address" : " jim@less2do.com " , "when" : 1.380616343673E12}]}
Receive default email:
Hello, To verify your account email, simply click the link below. http://localhost:3000/
Clicking the link allows me to:
http:
But no change to mongo db.
I expected something to be delayed with the help of accounts - the password has been processed / # / verify-email / N3sLEDMsutTbjxyzX and will update the user document.
accounts-base.js is trying
match = window.location.hash.match(/^\
but the location hash is empty by now.
Am I missing something, where do I need to manually configure the routes? Does my use of an iron router ruin things? Just in case,
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() ###
Thanks!