markbates / goth

Package goth provides a simple, clean, and idiomatic way to write authentication packages for Go web applications.
https://blog.gobuffalo.io/goth-needs-a-new-maintainer-626cd47ca37b
MIT License
5.42k stars 580 forks source link

Username/Password Authentication? #14

Closed tylerstillwater closed 9 years ago

tylerstillwater commented 9 years ago

Would Username/Password authentication be something we want in goth?

markbates commented 9 years ago

I've thought about it, but not sure how you'd go about it. Could probably implement basic http auth, but db driven would be a lot harder.

tylerstillwater commented 9 years ago

Right.. goth shouldn't care about the DB in any way. If anything, we'd need a callback function the calling code uses to do DB work for us.

tylerstillwater commented 9 years ago

I'm not sure user/pass makes much sense in terms of goth, though. It really is architected for oauth flows.

markbates commented 9 years ago

Sorry, I've been away for the last few days. I'm going to close this, for now. I agree I think it would be a of a shoehorn to get it in.

Let's keep in the back of our minds and if a solution pops in then we can re-open.

digitalplaywright commented 9 years ago

https://github.com/simplabs/rails_api_auth is a rails example for supporting the "Resource Owner Password Credentials Grant" OAuth 2.0 flow as well as Facebook authentication. It is extremely simple and not many lines of code, and hopefully this can be made into an equivalent. However, the scope of this package is for APIs with bearer tokens only and not for cookie based sessions.

lucagez commented 1 year ago

This PR https://github.com/markbates/goth/pull/506 can add support for the Password Grant flow