{"repo":"nmrshll/oauth2-noserver","free":true,"listed":false,"github":"https://github.com/nmrshll/oauth2-noserver","clone":"git clone https://github.com/nmrshll/oauth2-noserver.git","description":"Simplifying the oauth2 auth flow for desktop / cli apps that have no server side.","language":"Go","stars":81,"topics":["oauth2","cli","desktop","golang","golang-library"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"oauth2-noserver Simplifying the oauth2 auth flow for desktop / cli apps that have no server side. --- While oauth works fine for apps the have a server side, I personally find it a pain to use when developing simple desktop or cli applications. That's why needed something to turn a complete oauth flow into a one-liner (well, that's clearly exaggerated, but it's barely more). So here's how it works ! Installation Run go get -u github.com/nmrshll/oauth2-noserver Try out the included example with make example Usage 1. Create an oauth app on the website/service you want to authenticate into You must set the redirection URL to http://127.0.0.1:14565/oauth/callback for this library to function properly. Once done you should get credentials ( client id and client secret ) to use in your code. 2. From your Go program, authenticate your user like this : [embedmd]:# (./.docs/examples/quickstart/quickstart.go /func main/ $) The AuthURL and TokenURL can be found in the service's oauth documentation. Contributing Have improvement ideas or want to help ? Please start by opening an issue Related Used in: - google photos client library - google photos uploader cli License: MIT","default_branch":null,"files":null,"tree":[],"storefront":"/r/nmrshll","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nmrshll/oauth2-noserver/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}