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

What is grant? Why would I use it? #202

Open
seiyria opened this issue Nov 6, 2020 · 4 comments
Open

What is grant? Why would I use it? #202

seiyria opened this issue Nov 6, 2020 · 4 comments

Comments

@seiyria
Copy link

seiyria commented Nov 6, 2020

Heyo! Someone linked me to your project, and it looks great. I'll admit, though, that I have no idea what an oauth proxy is or why I would use it. I had hoped the README would shed some light on this, but it seems like it dives right into the technicals. Any chance someone could write out a little blurb in the readme? I think it would help future users who stumble across the project as well.

@simov
Copy link
Owner

simov commented Nov 6, 2020

Sure, the gist of it is that generally it's a bad practice to handle your user's email and password yourself, meaning having a form on your own website and storing that in your own database. For that reason people invented OAuth, which is framework to delegate the actual login (the web form) to a third-party provider, lets say Google or Facebook.

There are different ways to achieve that using OAuth, but the most secure one involves you having a server and doing some of the OAuth requests to the authorization server (Google, Facebook) on the backend. This module, Grant, helps you with that. And so if you have a server using any of the most popular HTTP frameworks for Node or a lambda on the cloud you can get social login to all of those providers with a little bit of JSON configuration. No code is required to use this module other than instantiating it and plugging it in your environment of choice.

That being said, Grant helps you with just that, getting the access token in response of the user logging in. What happens next is up to you and your implementation.

You can also check out my articles about it:

@seiyria
Copy link
Author

seiyria commented Nov 6, 2020

Thank you, that's really helpful! This is definitely the kind of information I was looking for, and the bonus articles help even more. Fantastic!

@moltar
Copy link

moltar commented Feb 11, 2021

I was having exactly the same issue. I can see grant being useful, but I wasn't sure how it fits into a big picture.

I think having that description and links in the README would solve this problem.

Thanks for the package. Looks great! :)

@hargup
Copy link

hargup commented May 24, 2021

Agree with @moltar looks like a super userful package. The readme should be more descriptive.

Maybe also link to a small video describing what is OAuth. I really liked this explaination. https://www.youtube.com/watch?v=SXDce0e3Ue4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants