Note that there are some explanatory texts on larger screens.

plurals
  1. POMeteor account email verify fails two ways
    primarykey
    data
    text
    <p>I have email hooked up on my dev box, and get a verification email after creating a user. I can click on the included link, and it will bring me to my main page.</p> <p>1) Clicking on the link seems to do some processing, because it redirects to /, but it does not change the verified flag on the user account.</p> <p>2) It seems to ignore my Accounts.config setting, and only works when I explicitly call </p> <pre><code>token = Accounts.sendVerificationEmail(userId) </code></pre> <p>Details: </p> <pre><code>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 </code></pre> <p>Server/lib/account.coffee</p> <pre><code>Accounts.config sendVerificationEmail: true forbidClientAccountCreation: true </code></pre> <p>server method:</p> <pre><code>Meteor.startup -&gt; create_user = (options) -&gt; 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 }) </code></pre> <p>After above called, mongo shows:</p> <pre><code>emails: [ { "address" : "jim@less2do.com" , "verified" : false}] and email: { "verificationTokens" : [ { "token" : "N3sLEDMsutTbjxyzX" , "address" : "jim@less2do.com" , "when" : 1.380616343673E12}]} </code></pre> <p>Get default email:</p> <pre><code>Hello, To verify your account email, simply click the link below. http://localhost:3000/#/verify-email/N3sLEDMsutTbjxyzX Thanks. </code></pre> <p>Clicking above link gets me to:</p> <pre><code>http://localhost:3000/ </code></pre> <p>But no changes to the mongo db. </p> <p>I was expecting something pulled in by accounts-password processed /#/verify-email/N3sLEDMsutTbjxyzX and would update the user document.</p> <p>accounts-base.js tries, with</p> <pre><code>match = window.location.hash.match(/^\#\/verify-email\/(.*)$/); </code></pre> <p>but the location hash is empty by this time.</p> <p>Am I missing something where I need to manually set up routes? Is my use of iron router ruining things? Just in case,</p> <pre><code>Router.map -&gt; 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: () -&gt; m = Messages.findOne this.params._id m._markRead() fixed = _.map m.history.versions, (msg) =&gt; msg.left = (msg.author is 'offer') msg.body = msg.body.replace( /[\r\n]+/g, "&lt;br&gt;") 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: -&gt; 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 &gt; 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() ### </code></pre> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload