سؤال

I'm trying to set up a login system with accounts-entry on meteor and I don't know how to set up the sign-out feature. The package says a /sign-out path is included but when I go to /sign-out it just redirects to the / path. How do I set up sign-out with accounts-entry?

هل كانت مفيدة؟

المحلول

That's how it's supposed to work. See the source code for that route: it first signs the user out, then redirects to the home page:

@route 'entrySignOut',
  path: '/sign-out'
  before: ->
    Session.set('entryError', undefined)
    if AccountsEntry.settings.homeRoute
      Meteor.logout () ->
        Router.go AccountsEntry.settings.homeRoute
    @stop()
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top