Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Problems with password authentication with everyauth
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 31 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andrea Di Mario  
View profile  
 More options Sep 19 2012, 9:04 am
From: Andrea Di Mario <anddima...@gmail.com>
Date: Wed, 19 Sep 2012 06:04:48 -0700 (PDT)
Local: Wed, Sep 19 2012 9:04 am
Subject: Problems with password authentication with everyauth

Hi, i'm a Derby/Everyauth's new user, i'm trying authentication with
password based on the example in this group and in the projects' Readme,
i've created a new derby project from command line and i wrote in
lib/server/index.js this:
https://gist.github.com/3749520

When i run, i've:

starting step - displayLogin
Error: Cannot find module 'undefined'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at new View
(/home/andrea/projects/first-project/node_modules/express/lib/view.js:42:49 )
    at Function.app.render
(/home/andrea/projects/first-project/node_modules/express/lib/application.j s:486:12)
    at render
(/home/andrea/projects/first-project/node_modules/express/lib/response.js:6 63:9)
    at ServerResponse.res.render
(/home/andrea/projects/first-project/node_modules/express/lib/response.js:6 87:5)
    at render
(/home/andrea/projects/first-project/node_modules/everyauth/lib/modules/pas sword.js:48:13)
    at Object.render [as _displayLogin]
(/home/andrea/projects/first-project/node_modules/everyauth/lib/modules/pas sword.js:56:16)
...finished step

It seems a rendering error. Could someone give me some suggestions about
this error?

Thanks for your time.
Best regards.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Владимир Махаев  
View profile   Translate to Translated (View Original)
 More options Sep 20 2012, 6:20 am
From: Владимир Махаев <vmakh...@gmail.com>
Date: Thu, 20 Sep 2012 03:20:52 -0700 (PDT)
Local: Thurs, Sep 20 2012 6:20 am
Subject: Re: Problems with password authentication with everyauth

I`ve got this error too. No suggestions.

среда, 19 сентября 2012 г., 17:04:48 UTC+4 пользователь Andrea Di Mario
написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrea Di Mario  
View profile  
 More options Sep 20 2012, 12:49 pm
From: Andrea Di Mario <anddima...@gmail.com>
Date: Thu, 20 Sep 2012 09:49:18 -0700 (PDT)
Local: Thurs, Sep 20 2012 12:49 pm
Subject: Re: Problems with password authentication with everyauth

Hi, maybe a bug, unfortunally the examples in the other post use only
facebook auth. We should wait for an example app or some more docs.

Regards


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tyler Renelle  
View profile  
 More options Sep 20 2012, 12:57 pm
From: Tyler Renelle <tylerrene...@gmail.com>
Date: Thu, 20 Sep 2012 12:56:43 -0400
Local: Thurs, Sep 20 2012 12:56 pm
Subject: Re: Problems with password authentication with everyauth

Yeah sorry, habit only has FB currently - other services (twitter, GH) to
come, but password looked daunting to me. When I tackle an everyauth fork
of chat/todoMVC, i'll be sure to include password.

On Thu, Sep 20, 2012 at 12:49 PM, Andrea Di Mario <anddima...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrea Di Mario  
View profile  
 More options Sep 21 2012, 2:59 am
From: Andrea Di Mario <anddima...@gmail.com>
Date: Thu, 20 Sep 2012 23:59:19 -0700 (PDT)
Local: Fri, Sep 21 2012 2:59 am
Subject: Re: Problems with password authentication with everyauth

Hi, great, really thanks.

Regards


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tyler Renelle  
View profile  
 More options Sep 22 2012, 10:22 pm
From: Tyler Renelle <tylerrene...@gmail.com>
Date: Sat, 22 Sep 2012 19:22:27 -0700 (PDT)
Local: Sat, Sep 22 2012 10:22 pm
Subject: Re: Problems with password authentication with everyauth

heads up, auth in habit coming up in the next few weeks - i'll do
todomvc/chat after that, so won't be *very *soon, but def. in the pipeline.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Владимир Махаев  
View profile   Translate to Translated (View Original)
 More options Oct 10 2012, 8:22 am
From: Владимир Махаев <vmakh...@gmail.com>
Date: Wed, 10 Oct 2012 05:22:34 -0700 (PDT)
Local: Wed, Oct 10 2012 8:22 am
Subject: Re: Problems with password authentication with everyauth

Still no solution?

среда, 19 сентября 2012 г., 17:04:48 UTC+4 пользователь Andrea Di Mario
написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Darryl Ryan  
View profile  
 More options Oct 11 2012, 6:10 am
From: Darryl Ryan <darryl.r...@gmail.com>
Date: Thu, 11 Oct 2012 03:10:13 -0700 (PDT)
Local: Thurs, Oct 11 2012 6:10 am
Subject: Re: Problems with password authentication with everyauth

Well he did say it would be a few weeks at least... I'd appreciate an
update on this too though... I have been checking back here every day in
anticipation  :)
I've got some awesome ideas of what I want to make with Derby but without
password authentication it just can't work and security isn't really
something I'd attempt myself without fully understanding how everything
works inside out, which I don't. Very tempted to start with certain other
frameworks out there that have auth examples already, but I can resist a
little longer.... just...a...bit...more...patience...must... resist :D


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tyler Renelle  
View profile  
 More options Oct 11 2012, 9:37 am
From: Tyler Renelle <tylerrene...@gmail.com>
Date: Thu, 11 Oct 2012 06:37:54 -0700 (PDT)
Local: Thurs, Oct 11 2012 9:37 am
Subject: Re: Problems with password authentication with everyauth

Hey guys, I promise I haven't forgotten - I've been inbetween jobs (aka,
juggling many) presently and haven't had any time, hopefully will have time
in the near future. Please see how far you can get using habitrpg<https://github.com/lefnire/habitrpg/blob/master/src/server/auth.coffee> side-by-side
with everyauth-example<https://github.com/bnoguchi/everyauth/tree/express3/example> as
example code, and I'll be back sometime soon.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt  
View profile  
 More options Oct 12 2012, 4:30 am
From: Matt <frenetic.b...@gmail.com>
Date: Fri, 12 Oct 2012 01:30:26 -0700 (PDT)
Local: Fri, Oct 12 2012 4:30 am
Subject: Re: Problems with password authentication with everyauth

Andrea,

I've been playing with password auth lately (I haven't gotten much farther
than you), but I've figured out the line of code that is causing the error.

  everyauth.password
    .loginKey('email')
    .loginFormFieldName('email')
    .loginWith('email')
    .getLoginPath('/login') * *
    .postLoginPath('/login') * *
    .loginView('login') //EXPLOD-A-MATIC!!!

I dived a bit into the code and I'm not exactly sure what's going on. I know if I pass in:
 login
 /views/app/login

I get the same exception. If I pass in
 login.html
 /views/app/login.html

The exception changes somewhat to:

Error: Cannot find module 'html'

My guess: Whatever derby is using to register templates doesn't use the file extension. However, this code expects the file extension to point to the view engine (like jade, as the example uses).

I found this comment in the source of password.js in EveryAuth for the loginView property.

This is what goes in loginView:

Either (A) the name of the view (e.g., "login.jade")
    or (B) the HTML string corresponds to the login page
    or (C) a function (errors, login) {...} that returns the HTML string incorporating the array of `errors` messages and the `login` used in the prior attempt'

Andrea, it sounds like we've both tried A, but because of the syntax for
the derby views, that doesn't work. I've been searching through the derby
source trying to find an easy way to render a view to a string so that I
could pass that to this method, but haven't figured it out yet.

Anyone else have some ideas?

Matt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Владимир Махаев  
View profile  
 More options Oct 26 2012, 10:10 am
From: Владимир Махаев <vmakh...@gmail.com>
Date: Fri, 26 Oct 2012 07:10:00 -0700 (PDT)
Subject: Re: Problems with password authentication with everyauth

After digging a little found something.

Everyauth uses express.js rendering (not derby).
Express.js needs engine for every file extension it renders. If there is
no, it tries to find one with simply doing:
engine = require(file extension)
That`s why we see error message.

So all we need is to add some engine to express.js or just do like this:

expressApp.engine 'html', do ->
cache = {}
return (path, options, cb) ->
try
str = cache[path] or cache[path] = fs.readFileSync path, 'utf8'
cb null, str
catch err
cb err

Now for login.html in views folder (express.js uses /views/ folder by
default):

.loginView('login.html')

That`s works but it`s half way solution, because in ideal we want derby.js
to render everything.
There is a static rendering in derby.js, you can find it in
app/server/serverError.js but to connect it to everyauth it`s needed to
change everyauth or derby`s static rendering. I`m not sure how to do it
best. Hope that derby team will consider this.

пятница, 12 октября 2012 г., 12:30:26 UTC+4 пользователь Matt написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
László Bácsi  
View profile  
 More options Oct 26 2012, 10:35 am
From: László Bácsi <lac...@lackac.hu>
Date: Fri, 26 Oct 2012 16:35:10 +0200
Local: Fri, Oct 26 2012 10:35 am
Subject: Re: Problems with password authentication with everyauth

I haven't checked but isn't it possible to drop the extension and have the
everyauth login page on another endpoint, maybe just /login?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Владимир Махаев  
View profile   Translate to Translated (View Original)
 More options Oct 26 2012, 10:46 am
From: Владимир Махаев <vmakh...@gmail.com>
Date: Fri, 26 Oct 2012 07:46:03 -0700 (PDT)
Local: Fri, Oct 26 2012 10:46 am
Subject: Re: Problems with password authentication with everyauth

It would be possible to pass undefined like an extension to
expressApp.engine function if it does not check for dot in extension.
So not possible.

пятница, 26 октября 2012 г., 18:35:36 UTC+4 пользователь Laszlo Bacsi
написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
László Bácsi  
View profile  
 More options Oct 26 2012, 11:00 am
From: László Bácsi <lac...@lackac.hu>
Date: Fri, 26 Oct 2012 16:59:42 +0200
Local: Fri, Oct 26 2012 10:59 am
Subject: Re: Problems with password authentication with everyauth

I meant if it's possible to configure everyauth so that it uses /login as
the login page and not /login.html.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Владимир Махаев  
View profile   Translate to Translated (View Original)
 More options Oct 26 2012, 11:22 am
From: Владимир Махаев <vmakh...@gmail.com>
Date: Fri, 26 Oct 2012 08:22:33 -0700 (PDT)
Local: Fri, Oct 26 2012 11:22 am
Subject: Re: Problems with password authentication with everyauth

I see no way.

пятница, 26 октября 2012 г., 19:00:09 UTC+4 пользователь Laszlo Bacsi
написал:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrea Di Mario  
View profile  
 More options Oct 26 2012, 11:29 am
From: Andrea Di Mario <anddima...@gmail.com>
Date: Fri, 26 Oct 2012 08:29:57 -0700 (PDT)
Local: Fri, Oct 26 2012 11:29 am
Subject: Re: Problems with password authentication with everyauth

Hi, thanks, now works with .html, now i've problems with jade and everyauth.password.loginFormFieldName
that seems not defined, I'm looking for that.

Best regards.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tyler Renelle  
View profile  
 More options Nov 5 2012, 4:38 pm
From: Tyler Renelle <tylerrene...@gmail.com>
Date: Mon, 5 Nov 2012 13:38:44 -0800 (PST)
Local: Mon, Nov 5 2012 4:38 pm
Subject: Re: Problems with password authentication with everyauth

Matt & (Vladimir?) are right, Everyauth's "password" module handles view
rendering (via res.render) directly, and so expects to be tied to a view
engine (jade) and view files. Integration with Derby's mustache-offshoot
templating system will have be built either as an express-compatible view
engine (since even static routes use Derby's engine), or as an exception in
Everyauth's password.js<https://github.com/bnoguchi/everyauth/blob/master/lib/modules/passwor...> file.
I think the latter is the best method, maybe password.js can expose a
configurable - like *dontRender* - which would bypass all rendering code
and leave passing variables to views to our own devices (which we'd do via
model.set("_errors", errors), for example).

I came across this trying to implement a working example of password login
in my authentication example<https://github.com/lefnire/derby-examples/tree/master/authentication>.
My thoughts then were: Ok, then let's not use password module as Everyauth
middleware, but instead let's create our own custom middleware that calls
functions from password module just to reuse some logic. However, all the
methods are chained promises, so I don't think they're accessible to be
called directly.

So as it stands, even with Vladimir's html-engine hack, I don't think
everyauth/password and derby are compatible. So here are next step options

   - Create pull request for Brian a la previous mentioned modifications (*
   dontRender* configurable, or something)
   - Handle user registration and login with custom code, not Everyauth. It
   shouldn't be too difficult, I'm not sure that everyauth adds too much in
   the way of password login (I use Everyauth for its social-network api
   integration)
   - Or use Passport <http://passportjs.org/>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tyler Renelle  
View profile  
 More options Nov 7 2012, 12:18 pm
From: Tyler Renelle <tylerrene...@gmail.com>
Date: Wed, 7 Nov 2012 09:18:41 -0800 (PST)
Local: Wed, Nov 7 2012 12:18 pm
Subject: Re: Problems with password authentication with everyauth

Keep an eye on my auth example<https://github.com/lefnire/derby-examples/tree/master/authentication>.
I'm trying to separate code out into a node module "derby-auth". Having a
lot of trouble with password authentication, so please fork if you have any
insights. My plans are to play around with providing my own
everyauth.submodule called derbyPassword (in ./lib) which re-uses a bunch
of password.js code, but makes it compatible with Derby. If this proves too
difficult, I'm going to replace Everyauth with Passport.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tyler Renelle  
View profile  
 More options Nov 14 2012, 1:08 am
From: Tyler Renelle <tylerrene...@gmail.com>
Date: Tue, 13 Nov 2012 22:08:09 -0800 (PST)
Local: Wed, Nov 14 2012 1:08 am
Subject: Re: Problems with password authentication with everyauth

At long last, it lives: auth-example<https://github.com/lefnire/derby-examples/tree/master/authentication>,
which uses the new derby-auth <https://github.com/lefnire/derby-auth> npm
module. Very rough around the edges, so please pull-request the shit out of
that bad boy. But for the most part I have registration / login working,
plus sample oauths with Github, Linkedin, Twitter, & Facebook.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andrea Di Mario  
View profile  
 More options Nov 14 2012, 4:39 am
From: Andrea Di Mario <anddima...@gmail.com>
Date: Wed, 14 Nov 2012 01:39:27 -0800 (PST)
Local: Wed, Nov 14 2012 4:39 am
Subject: Re: Problems with password authentication with everyauth

Hi, a great work, only
on derby-examples/authentication/lib/server/index.js:66:58 you wrote
authoConf, instead authConf.

Really thanks.
Best regards.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tyler Renelle  
View profile  
 More options Nov 14 2012, 9:03 am
From: Tyler Renelle <tylerrene...@gmail.com>
Date: Wed, 14 Nov 2012 09:03:04 -0500
Local: Wed, Nov 14 2012 9:03 am
Subject: Re: Problems with password authentication with everyauth

Fixed, thanks Andrea

On Wed, Nov 14, 2012 at 4:39 AM, Andrea Di Mario <anddima...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tyler Renelle  
View profile  
 More options Nov 14 2012, 12:43 pm
From: Tyler Renelle <tylerrene...@gmail.com>
Date: Wed, 14 Nov 2012 09:43:42 -0800 (PST)
Local: Wed, Nov 14 2012 12:43 pm
Subject: Re: Problems with password authentication with everyauth

update: example has been moved to derby-auth/example<https://github.com/lefnire/derby-auth/tree/master/example>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matteo Brunati  
View profile  
 More options Nov 15 2012, 5:39 am
From: Matteo Brunati <mattbru...@gmail.com>
Date: Thu, 15 Nov 2012 02:39:41 -0800 (PST)
Local: Thurs, Nov 15 2012 5:39 am
Subject: Re: Problems with password authentication with everyauth

Hi Tyler!
Thanks for your work! I'm approaching Derby for a new project in these
days, and without your work it would have been really more painful ;)

Looking around in the source code, I found a typo and JSLint proposed me
some coding improvements in index.js. I don't know if you want to consider
them:
- line #4: "savedStrageties" should be "savedStrategies" ;)
- lines #44, #148, #202, #234: add ";"
- line #234: remove ";"

Best regards,
Matteo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matteo Brunati  
View profile  
 More options Nov 15 2012, 6:08 am
From: Matteo Brunati <mattbru...@gmail.com>
Date: Thu, 15 Nov 2012 03:08:57 -0800 (PST)
Local: Thurs, Nov 15 2012 6:08 am
Subject: Re: Problems with password authentication with everyauth

Hi,
Sorry for my first reply, but after sending it I've noticed that you made
quite substantial changes... :/

So:
* for derby-auth/index.js:
  - the "savedStrategies" typo is not there any more since you changed the
variable in "_strategies"
  - some ";" are still missing, but they changed line number: #12, #35,
#62, #75, #180, #236
  - there's still the unnecessary ";" at line 268
* for example/lib/server/index.js:
  - again missing some ";", in lines #9, #12, #24, #20
* As for running the example, in the README.md file in the
derby-auth/example folder, I would suggest to remember people they have to
run "npm install" in both the derby-auth/ and the derby-auth/example
directories.

I Apologize if my points are too silly! I hope my eventual next posts will
be more "constructive" ;)

Regards,
Matteo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tyler Renelle  
View profile  
 More options Nov 15 2012, 9:07 am
From: Tyler Renelle <tylerrene...@gmail.com>
Date: Thu, 15 Nov 2012 09:07:34 -0500
Local: Thurs, Nov 15 2012 9:07 am
Subject: Re: Problems with password authentication with everyauth

These points are absolutely not silly, JSLint suggestions are quite
constructive. However, I would recommend future modifications to be Github
pull requests for these reasons: (1) creates trackable trail, (2) can be
tested (there are not tests now, but later), (3) cuts down on code in
forums. Also, more <https://coderwall.com/dashboard>
and<https://masterbranch.com/>
more <http://geekli.st/> sites <https://workforpie.com/> have begun
tracking coder "clout" by their Github activity, so pull requests will
improve your "online score" :)

On Thu, Nov 15, 2012 at 6:08 AM, Matteo Brunati <mattbru...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 31   Newer >
« Back to Discussions « Newer topic     Older topic »