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

Hapi Auth Basic implementation (can we simplify this...?) #52

Closed
nelsonic opened this issue Mar 5, 2015 · 2 comments
Closed

Hapi Auth Basic implementation (can we simplify this...?) #52

nelsonic opened this issue Mar 5, 2015 · 2 comments
Labels
discuss Share your constructive thoughts on how to make progress with this issue enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! investigate

Comments

@nelsonic
Copy link
Member

nelsonic commented Mar 5, 2015

I'm not a fan of how hapi-auth-basic
requires username & password to be sent to the server as:

{ authorisation : 'Basic ' + (new Buffer(username + ':' + password, 'utf8')).toString('base64') }

i.e. the front-end app has to base64 encode the un+:+pw and send it in the auth header.
see: http://git.io/xdjk

I would propose we _fork_ the module and create a second option:

payload: {
  email: "your@email.co",
  password: "5up3r53cr3t54uc3!"
}

Thereby allowing people to send the authentication POST request to /login with either the auth header _or_ a form payload.

@nelsonic nelsonic added enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! discuss Share your constructive thoughts on how to make progress with this issue Post MVP investigate labels Mar 5, 2015
@nelsonic nelsonic mentioned this issue Mar 5, 2015
@nelsonic
Copy link
Member Author

Asked @mtharrison if he would accept a PR ... hapijs/basic#38

@nelsonic
Copy link
Member Author

nelsonic commented Jul 2, 2016

@nelsonic nelsonic closed this as completed Jul 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Share your constructive thoughts on how to make progress with this issue enhancement New feature or enhancement of existing functionality help wanted If you can help make progress with this issue, please comment! investigate
Projects
None yet
Development

No branches or pull requests

1 participant