{"id":18972382,"url":"https://github.com/wuriyanto48/go-social","last_synced_at":"2025-08-21T07:16:03.604Z","repository":{"id":129542688,"uuid":"149276328","full_name":"wuriyanto48/go-social","owner":"wuriyanto48","description":"a Pluggable OAuth client library for social login (Google, Facebook, Github, Linkedin, Microsoft Identity Platform)","archived":false,"fork":false,"pushed_at":"2023-11-11T05:21:06.000Z","size":30,"stargazers_count":14,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-18T19:33:26.922Z","etag":null,"topics":["azure","azure-active-directory","facebook","facebook-api","facebook-login","github","github-login","go","golang","golang-http","golang-library","golang-package","google","google-login","microsoft-identity-platform","oauth2"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wuriyanto48.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-18T11:20:38.000Z","updated_at":"2025-02-19T08:49:58.000Z","dependencies_parsed_at":"2023-11-11T04:30:05.695Z","dependency_job_id":"5a69af4e-5f1c-4a02-a620-3de9f84fdd09","html_url":"https://github.com/wuriyanto48/go-social","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/wuriyanto48/go-social","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuriyanto48%2Fgo-social","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuriyanto48%2Fgo-social/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuriyanto48%2Fgo-social/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuriyanto48%2Fgo-social/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wuriyanto48","download_url":"https://codeload.github.com/wuriyanto48/go-social/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wuriyanto48%2Fgo-social/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271442147,"owners_count":24760353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["azure","azure-active-directory","facebook","facebook-api","facebook-login","github","github-login","go","golang","golang-http","golang-library","golang-package","google","google-login","microsoft-identity-platform","oauth2"],"created_at":"2024-11-08T15:08:21.213Z","updated_at":"2025-08-21T07:16:03.570Z","avatar_url":"https://github.com/wuriyanto48.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Pluggable OAuth library for social login (Google, Facebook, Github, Linkedin)\n\n\n[![GoDoc](https://godoc.org/github.com/wuriyanto48/go-social?status.svg)](https://godoc.org/github.com/wuriyanto48/go-social)\n[![Build Status](https://travis-ci.org/wuriyanto48/go-social.svg?branch=master)](https://travis-ci.org/wuriyanto48/go-social)\n[![CircleCI](https://circleci.com/gh/wuriyanto48/go-social.svg?style=svg)](https://circleci.com/gh/wuriyanto48/go-social)\n\n[![forthebadge](https://forthebadge.com/images/badges/made-with-go.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/fuck-it-ship-it.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/contains-technical-debt.svg)](https://forthebadge.com)\n\n### Install\n```shell\n$ go get github.com/wuriyanto48/go-social\n```\n\n### Usage\n\nOAuth2 using Facebook login\n\n* Getting Authorization Code First\n`https://www.facebook.com/dialog/oauth?client_id={your_client_id}\u0026redirect_uri=http://localhost:8080/callback\u0026response_type=code`\n\n* Place the Authorization Code to the second parameter of `GetAccessToken(ctx, \"authorization_code\")` function\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/wuriyanto48/go-social\"\n\t\"github.com/wuriyanto48/go-social/pkg/facebook\"\n)\n\nfunc main() {\n\tf, err := social.New(social.Facebook, \"client_id\", \"client_secret\", \"\", \"http://localhost:8080/callback\", \"\", 0)\n\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\t\n\t// using context for cancellation\n\tctx := context.Background()\n\n\terr = f.GetAccessToken(ctx, \"authorization_code\")\n\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\tresult, err := f.GetUser(ctx)\n\n\tif err != nil {\n\t\tfmt.Println(err)\n\t}\n\n\tuser, _ := result.(*facebook.User)\n\n\tfmt.Println(user.Picture)\n}\n\n```\n\n### Todo\n- Add Twitter implementation","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwuriyanto48%2Fgo-social","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwuriyanto48%2Fgo-social","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwuriyanto48%2Fgo-social/lists"}