bnoguchi / everyauth

node.js auth package (password, facebook, & more) for Connect and Express apps
http://everyauth.com/
3.49k stars 447 forks source link

ejs helpers are missing when everyauth renders layout #163

Open rrollins opened 12 years ago

rrollins commented 12 years ago

I've set up a railwayjs application but it looks like everyauth is not including everything my ejs views need. I'm getting the following exception:

starting step - displayLogin
ReferenceError: /Users/royce/projects/pollenware/c2fo_ui/app/views/layouts/application_layout.ejs:5
    3|   <head>
    4|     <title><%= title %></title>
 >> 5|     <%- stylesheet_link_tag('reset', 'style') %>
    6|     <%- javascript_include_tag('https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', 'rails', 'application') %>
    7|     <%- csrf_meta_tag() %>
    8|     <%- javascript_include_tag('http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.js') %>

stylesheet_link_tag is not defined

I've defined a password authentication and referenced the layout and view. Although I didn't think referencing the layout explicitly would be necessary. I think everyauth should use whatever the default layout for my app is.

In config/environment.js:

everyauth.password
  .loginLocals({
     title: 'Login'
  })
  .getLoginPath('/login') // Uri path to the login page
  .postLoginPath('/login') // Uri path that your login form POSTs to
  .loginView('main/login.ejs')

   .loginLayout('layouts/application_layout.ejs')
  .authenticate( function (login, password) {
    return true;
  })
  .getRegisterPath('/register') // Uri path to the registration page
  .postRegisterPath('/register') // The Uri path that your registration form POSTs to
  .registerView('a string of html; OR the name of the jade/etc-view-engine view')
  .validateRegistration( function (newUserAttributes) {
  })
  .registerUser( function (newUserAttributes) {
  })
  .loginSuccessRedirect('/main/home');
martinthogersen commented 12 years ago

I have the same problem. Any updates?

sebastianwoinar commented 11 years ago

Me too. Any news about that issue?

mastix commented 11 years ago

Any updates on this? Any solution yet? :)