meteor-useraccounts / core

Meteor sign up and sign in templates' core functionalities
http://useraccounts.meteor.com/
MIT License
529 stars 281 forks source link

ensureSignedIn plugin not found error only in production/bundled mode #294

Closed nate-strauser closed 9 years ago

nate-strauser commented 9 years ago

image

i only get this error when in production/bundled mode - seems to work fine in development mode

this error leaves the protected routes accessible to a non-logged in user in development, i get the proper redirection to the sign in page, while in production the non-logged in user can access the routes

i think i'm using the plugin correctly - https://github.com/nate-strauser/wework/blob/master/client/main.js#L158

tried moving the routes to the /lib directory instead of /client but that presented this error

/mnt/data/1/node_modules/fibers/future.js:173
                        throw(ex);
                              ^
Error: No plugin found named "ensureSignedIn"
    at Function.Router.plugin (packages/iron:router/lib/router.js:394:1)
    at app/lib/router.js:159:8
    at app/lib/router.js:167:3
    at /mnt/data/1/programs/server/boot.js:205:10
    at Array.forEach (native)
    at Function._.each._.forEach (/mnt/data/1/node_modules/underscore/underscore.js:79:11)
    at /mnt/data/1/programs/server/boot.js:116:5
nate-strauser commented 9 years ago

i reverted back to the soon to be deprecated onbeforeaction version, this works as expected, prompting the user to log in

splendido commented 9 years ago

wow :(

This is something to be investigated!

...the second error you're reporting should be solved since f078f8cb81adeb83e23355f860c7e4ca0b910247

please make sure you're running on v1.8.1

nate-strauser commented 9 years ago

i'm on 1.8.1 for sure - https://github.com/nate-strauser/wework/blob/master/.meteor/versions#L120

i do want to move the routes out of client, i'll check again when i do that refactoring

splendido commented 9 years ago

Hei Nathan, I've just deployed the latest version of the semantic-ui boilerplate on useraccounts-semantic-ui.meteor.com and it seem to work as expected...

Lets have a look at the private page!

Could you provide some more details about your deploying environment?

splendido commented 9 years ago

The same for the private page for the bootstrap version...

These lines are those used to configure the plugin...