Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

login route #66

Closed
pgherveou opened this issue Sep 12, 2011 · 4 comments
Closed

login route #66

pgherveou opened this issue Sep 12, 2011 · 4 comments

Comments

@pgherveou
Copy link

when using password authentication, one must define getLoginPath, and loginView.
if my understanding is correct this define the login route and eventually override any route already defined for the same path
how can I define more options for the rendering, like specifying custom layout, pass some data to the template, rendering different format, or redirect if user is already logged in without breaking everyauth plugin ?

@bnoguchi
Copy link
Owner

For layout, there is a configurable similar to loginView called loginLayout. Likewise, you can configure registerLayout.

To pass locals to a template, you can configure loginLocals and registerLocals. This locals object literal will get passed to the render call, if you are using express.

Redirect if the user is already logged in should occur automatically.

@niftylettuce
Copy link

Redirect if already logged in when visiting the /login route doesn't seem to be working, at least with mongoose-auth?

Can you try duplicating this error on your end?

@jleibund
Copy link

jleibund commented Oct 3, 2011

Are everyauth or mongoose internally tied to jade? Was thinking of swapping out jade for another engine in express - maybe node-jqtpl. Paging through the everyauth/mongoose libraries there seem to be several dependencies on jade - in package.json and in several routes that refer to 'new.jade' and other wiring in the login/reg workflow. Know docs say, in theory, that this can be used with other template engines, but does it actually work without jade there or registered in express (you can only pick one, correct?). Sorry if this is a noob question.

@niftylettuce
Copy link

I'm sure you can use everyauth with jqtpl, ejs, eco, or any other templating engine you'd like! Read the docs per whichever templating engine you'd like to use, and then incorporate it where necessary. If you need help with a particular engine, say jqtpl, then post your code using a gist in a new issue and we'll help you in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants