{"id":21131327,"url":"https://github.com/poundifdef/connectivly","last_synced_at":"2025-07-09T01:33:45.205Z","repository":{"id":223936448,"uuid":"637927959","full_name":"poundifdef/connectivly","owner":"poundifdef","description":"Add OAuth + OIDC to your app with a single callback","archived":false,"fork":false,"pushed_at":"2024-09-18T14:59:57.000Z","size":138,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T15:01:44.082Z","etag":null,"topics":["oauth2","oauth2-provider","oauth2-server","oidc","oidc-provider"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poundifdef.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-05-08T17:57:10.000Z","updated_at":"2024-10-13T02:45:38.000Z","dependencies_parsed_at":"2024-02-22T21:27:41.719Z","dependency_job_id":"e885b135-be92-451a-87a9-98a5915fe8b9","html_url":"https://github.com/poundifdef/connectivly","commit_stats":null,"previous_names":["poundifdef/connectivly"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/poundifdef/connectivly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poundifdef%2Fconnectivly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poundifdef%2Fconnectivly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poundifdef%2Fconnectivly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poundifdef%2Fconnectivly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poundifdef","download_url":"https://codeload.github.com/poundifdef/connectivly/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poundifdef%2Fconnectivly/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264375612,"owners_count":23598414,"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","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":["oauth2","oauth2-provider","oauth2-server","oidc","oidc-provider"],"created_at":"2024-11-20T05:54:09.925Z","updated_at":"2025-07-09T01:33:44.642Z","avatar_url":"https://github.com/poundifdef.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Connectivly\n\n**Add OAuth to your API in a few lines of code.**\n\nConnectivly is an OAuth provider which requires minimal configuration. \nIt allows your users to create apps for your platform,\nenables \"sign in with YOUR APP\", and handles the entire OAuth dance.\n\nYou can add OAuth + OIDC to your existing application by adding a single \nauthenticated endpoint to approve OAuth requests. \n\nConnectivly doesn't \"own\" your users database - it assumes you're already \nmanaging users and accounts in your own application. It work alonside your DB,\nAuth0, Sign In With Google, or other third party identity provider.\n\n## Getting Started\n\nConnectivly is packaged as a single go binary. You just need to configure 1 option:\na callback URL to your app.\n\n### 1. Run Connectivly Server\n\n``` bash\n$ export CONNECTIVLY_REDIRECT_URL=\"https://your-app.example.com/connectivly\"\n$ go run connectivly\n\nListening... http://localhost:3000\n\nAPI Key: zWp2kjQSmN85saBgeWkWF6Riz1GmQEhR\n\nClient 1 App\nClient ID: client1\nClient Secret: secret1\n\nClient 2 App\nClient ID: client2\nClient Secret: secret2\n```\n\nThe app will listen on `http://localhost:3000`. The first time it runs, connectivly\nwill automatically generate an API key and example client apps for testing.\n\n\n### 2. Add a `/connectivly` endpoint to your app.\nThis endpoint **must** be authenticated (ie, users must be logged in to be able to reach this.)\n\nDuring the auth flow, the user will be redirected to the URL you specify in \n`CONNECTIVLY_REDIRECT_URL`, which is `https://your-app.example.com/connectively?token=12345`\nin this example.\n\nYour app should make a an API call to connectivly as follows:\n\n``` bash\ncurl -XPOST -H 'X-API-KEY: zWp2kj...' \\\n    -H \"Content-type: application/json\" \\\n    -d '{\"user\": \"test@example.com\"}' \\\n    'http://localhost:3000/api/auth_session/12345/approve'\n```\n\nThis call is saying \"We authorize `test@example.com` to log in.\" It will return a `redirect_uri`.\nRedirect the user there and connectivly completes the OAuth dance.\n\nBefore you do this, you can call `GET /api/auth_session/12345`. This returns information about\nthe app, end-user, and scopes requested. If you don't want to approve the session, make a POST\nrequest to `/deny` instead.\n\n#### Flask Example\n\nHere is an example using Flask:\n\n``` py\n@app.route(\"/connectivly\")\n@login_required\ndef connectivly_auth():\n    session_id = request.args[\"token\"]\n    approval = requests.post(\n            \"http://localhost:3000/api/auth_session/\" + session_id + \"/approve\",\n            json={\"user\": \"test@example.com\"},\n            headers={\"X-API-KEY\": \"zWp2kj...\"},\n    ).json()\n    return redirect(approval['redirect_uri'])\n```\n\n### 3. Authorize using OAuth\n\nUsing one of the Client ID credentials, you can now implement an oauth flow against your application.\nUse \"openid\" as the scope.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoundifdef%2Fconnectivly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoundifdef%2Fconnectivly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoundifdef%2Fconnectivly/lists"}