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

Add Auth0 provider #188

Merged
merged 4 commits into from Feb 27, 2016
Merged

Add Auth0 provider #188

merged 4 commits into from Feb 27, 2016

Conversation

@rolodato
Copy link
Contributor

rolodato commented Feb 25, 2016

Wanting to use Auth0 with bell so I implemented it as a provider. If this could eventually get merged I can write the tests and add it to docs.

Some references:

Thanks!

Rodrigo López Dato

exports = module.exports = function (options) {

options = options || {};

This comment has been minimized.

Copy link
@ldesplat

ldesplat Feb 25, 2016

Contributor

You should be enforcing that domain exists and is a string. See phabricator.js for an example.

@ldesplat

This comment has been minimized.

Copy link
Contributor

ldesplat commented Feb 25, 2016

Add the docs and tests as well and I'll be very happy to accept this.

Thank you.

@rolodato

This comment has been minimized.

Copy link
Contributor Author

rolodato commented Feb 25, 2016

@ldesplat Tests and docs added.

@rolodato rolodato changed the title WIP: Add Auth0 provider Add Auth0 provider Feb 25, 2016
@ldesplat ldesplat added this to the 7.0.0 milestone Feb 27, 2016
@ldesplat

This comment has been minimized.

Copy link
Contributor

ldesplat commented Feb 27, 2016

Thanks again :)

ldesplat added a commit that referenced this pull request Feb 27, 2016
Add Auth0 provider
@ldesplat ldesplat merged commit 7a83ff1 into hapijs:master Feb 27, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rolodato

This comment has been minimized.

Copy link
Contributor Author

rolodato commented Feb 27, 2016

No problem, thank you! Looking forward to the new release 👍

@travi

This comment has been minimized.

Copy link
Contributor

travi commented on d18c813 Mar 4, 2016

Thank you for this addition. Made integration of auth0 far simpler than the approach that I thought I would need.

This comment has been minimized.

Copy link
Contributor

rolodato replied Mar 7, 2016

@travi No problem! Out of curiosity, are you using any other hapi libraries for session management or authentication? Looking to build an Auth0 hapi example but just started using it a few weeks ago.

This comment has been minimized.

Copy link
Contributor

travi replied Mar 7, 2016

So far I'm just using hapi-auth-cookie for the session piece. It's simple and covers my needs so far. I would say thats a good place to start if you're looking to create an example for others to reference.

The other piece that I would love to see covered in an example like that is configuring a CNAME so that the redirect to auth0.com doesn't look like a phishing attack to those unfamiliar with auth0, but instead uses my own domain. Configuring the CNAME on my side is simple enough, but I don't find anywhere to set it up the auth0 side in the admin tool. This is a really simple config for things like heroku and GItHub pages, so I would think this would be an important part of the auth0 offering as well.

@travi

This comment has been minimized.

Copy link
Contributor

travi commented on d18c813 Mar 4, 2016

Thank you for this addition. Made integration of auth0 far simpler than the approach that I thought I would need.

This comment has been minimized.

Copy link
Contributor

rolodato replied Mar 7, 2016

@travi No problem! Out of curiosity, are you using any other hapi libraries for session management or authentication? Looking to build an Auth0 hapi example but just started using it a few weeks ago.

This comment has been minimized.

Copy link
Contributor

travi replied Mar 7, 2016

So far I'm just using hapi-auth-cookie for the session piece. It's simple and covers my needs so far. I would say thats a good place to start if you're looking to create an example for others to reference.

The other piece that I would love to see covered in an example like that is configuring a CNAME so that the redirect to auth0.com doesn't look like a phishing attack to those unfamiliar with auth0, but instead uses my own domain. Configuring the CNAME on my side is simple enough, but I don't find anywhere to set it up the auth0 side in the admin tool. This is a really simple config for things like heroku and GItHub pages, so I would think this would be an important part of the auth0 offering as well.

@rolodato

This comment has been minimized.

Copy link
Contributor Author

rolodato commented Mar 8, 2016

Thanks @travi. As of today Auth0 does not support configuring custom domains for login pages, but that's in our backlog (currently only supported for private instances which have their own domains instead of Auth0 subdomains).

Don't want to pollute this PR further, so if you want to discuss anything Auth0-related feel free to email me or create a thread at https;//ask.auth0.com. Thanks!

@rolodato

This comment has been minimized.

Copy link
Contributor Author

rolodato commented Apr 7, 2016

For anyone stumbling upon this PR, I've created a Hapi + Auth0 sample here: https://github.com/auth0/node-auth0/tree/2a07a14de7add7188a2d997fe9f2af09173d912d/examples/hapi-regular-webapp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.