{"id":37171661,"url":"https://github.com/loomnetwork/oauth2-noserver","last_synced_at":"2026-01-14T20:01:50.252Z","repository":{"id":57652664,"uuid":"106807514","full_name":"loomnetwork/oauth2-noserver","owner":"loomnetwork","description":"Simplifying the oauth2 auth flow for desktop / cli apps that have no server side.","archived":false,"fork":true,"pushed_at":"2017-10-13T15:58:17.000Z","size":64,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-07-27T22:19:34.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"nmrshll/oauth2-noserver","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loomnetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-13T09:53:26.000Z","updated_at":"2018-08-22T01:41:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/loomnetwork/oauth2-noserver","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/loomnetwork/oauth2-noserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loomnetwork%2Foauth2-noserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loomnetwork%2Foauth2-noserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loomnetwork%2Foauth2-noserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loomnetwork%2Foauth2-noserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loomnetwork","download_url":"https://codeload.github.com/loomnetwork/oauth2-noserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loomnetwork%2Foauth2-noserver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T20:01:49.561Z","updated_at":"2026-01-14T20:01:50.247Z","avatar_url":"https://github.com/loomnetwork.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oauth2ns: easy oauth2 for purely client side apps (desktop GUI, cli, mobile)\nWhile 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.  \nThat's why needed something to turn a complete oauth flow into a one-liner (well, that's clearly exaggerated, but it's barely more).  \n\nSo here's how it works !  \n\n# Usage\n\nOn the web service that you want your app to authenticate into, register you app (aka client) to get a `client id` and a `client secret`. \n\n**IMPORTANT**: you must set the redirection URL to `http://127.0.0.1:14565/oauth/callback` for this lib to function properly.  \n\nHere's an example of creating an app on bitbucket. The UI is usually similar on other web services.  \n\n![alt text](./.readme/creating-oauth-apps.png \"app creation parameters\")\n\nThis will give you the `client id` and `client secret` you need to authenticate your apps' users.\n\n\n\nAnd then, from your Go program, authenticate your user like this :  \n\n[embedmd]:# (./example/example.go)\n```go\npackage main\n\nimport (\n\t\"github.com/n-marshall/oauth2ns\"\n\t\"golang.org/x/oauth2\"\n)\n\nfunc main() {\n\tconf := \u0026oauth2.Config{\n\t\tClientID:     \"tRQ9V3cyLxHu3xXFWM\",               // also known as slient key sometimes\n\t\tClientSecret: \"PZEU9ruk3eZxYvAeCRgS9YyYpAybLG4P\", // also known as secret key\n\t\tScopes:       []string{\"account\"},\n\t\tEndpoint: oauth2.Endpoint{\n\t\t\tAuthURL:  \"https://bitbucket.org/site/oauth2/authorize\",\n\t\t\tTokenURL: \"https://bitbucket.org/site/oauth2/access_token\",\n\t\t},\n\t}\n\t/*client := ...*/ _ = oauth2ns.Authorize(conf)\n\t// use client.Get / client.Post for further requests, the token will automatically be there\n}\n```\n\nThe `AuthURL` and `TokenURL` can be found in the service's oauth documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floomnetwork%2Foauth2-noserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floomnetwork%2Foauth2-noserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floomnetwork%2Foauth2-noserver/lists"}