Switched herokaiOnlyHandler to a general-purpose authCallback.#21
Switched herokaiOnlyHandler to a general-purpose authCallback.#21
herokaiOnlyHandler to a general-purpose authCallback.#21Conversation
|
Fix for #20 |
There was a problem hiding this comment.
This seems right to me. reauthenticate is a bit of a misnomer, as this actually 401s for a JSON request or redirects to /auth/heroku for a non-JSON request.
I believe you do need to return here, though. I haven't looked at this code in ages :(
There was a problem hiding this comment.
Also, you might be able to clean this stuff up by setting options.authCallback to a function() { return true; } by default and options.authCallbackFailedHandler = reauthenticate by default.
Then all you need is
options.authCallback(userSession.user) || return options.authCallbackFailedHandler(req, res, next);|
@jclem I see you are no longer maintaining this? Can you please grant admin rights to me and @mmowris ? Working on node-heroku SSO apps and would like to pick this up. @jacobian - not sure if you ever used above PR, but have done some initial testing on the branch and had success. (I know it's been a while but fYI) Thx! |
|
@joeyjmorales I'm no longer at Heroku and don't have admin rights on this repo any longer. I'm not sure who a current maintainer is. |
|
I think @dickeyxxx may be able to help you out here, though. |
|
This PR is way out of date
…On Tue, Aug 1, 2017 at 5:00 AM Jonathan Clem ***@***.***> wrote:
I think @dickeyxxx <https://github.com/dickeyxxx> may be able to help you
out here, though.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AANMfICdXUqmmhCdJrOUOZucQ2pAl30sks5sTwVQgaJpZM4DegA4>
.
|
|
Ooops I thought this was for node-heroku-client, nevermind |
|
Thanks @dickeyxxx . Are you current maintainer? Wondering if we can push this PR through and/or, if it needs a maintainer, I'd be happy to chip in on this as we are using it for CSA Portal app. Let me know. Thanks! |
|
yeah I can probably take ownership of it, though not until next week, I'm busy this week in Denver |
No description provided.