{"id":20173372,"url":"https://github.com/d-date/oauth2client","last_synced_at":"2025-07-04T02:36:14.996Z","repository":{"id":47242675,"uuid":"331198795","full_name":"d-date/OAuth2Client","owner":"d-date","description":"Lightweight OAuth 2.0 Client with PKCE (Proof key for Code Exchange: see [RFC 7636](https://tools.ietf.org/html/rfc7636))","archived":false,"fork":false,"pushed_at":"2021-09-07T10:00:11.000Z","size":16,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T03:17:17.628Z","etag":null,"topics":["ios","macos","oauth2-client","pkce","pkce-flow","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d-date.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":"2021-01-20T05:07:14.000Z","updated_at":"2024-06-01T15:54:28.000Z","dependencies_parsed_at":"2022-09-03T13:30:24.663Z","dependency_job_id":null,"html_url":"https://github.com/d-date/OAuth2Client","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-date%2FOAuth2Client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-date%2FOAuth2Client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-date%2FOAuth2Client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-date%2FOAuth2Client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-date","download_url":"https://codeload.github.com/d-date/OAuth2Client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248148247,"owners_count":21055548,"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":["ios","macos","oauth2-client","pkce","pkce-flow","swift"],"created_at":"2024-11-14T01:35:53.271Z","updated_at":"2025-04-10T03:17:22.371Z","avatar_url":"https://github.com/d-date.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://swift.org/package-manager/\"\u003e\u003cimg src=\"https://img.shields.io/badge/SPM-ready-orange.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/d-date/OAuth2Client/blob/master/LICENSE\"\u003e\u003cimg alt=\"MIT License\" src=\"http://img.shields.io/badge/license-MIT-blue.svg\"/\u003e\u003c/a\u003e\n\n# OAuth2Client\n\nLightweight OAuth 2.0 Client with PKCE (Proof key for Code Exchange: see [RFC 7636](https://tools.ietf.org/html/rfc7636))\n\n## Usage\n\n### Sign in\n\n```swift\nOAuth2Client().signIn(request: request) \n  .receive(on: yourQueue)\n  .sink(receiveCompletion: { (completion) in\n    \n  }, receiveValue: { (credential) in\n    credential.save()\n  })\n```\n\n### Load Access Token\n\n```swift\nCredential.load()\n```\n\n### Refresh\n\n```swift\nOAuth2Client().refresh(request: request) \n.receive(on: yourQueue)\n.sink(receiveCompletion: { (completion) in\n\n}, receiveValue: { (credential) in\ncredential.save()\n})\n```\n\n### Sign Out\nRemoving cache on WebKit, and showing new auth screen.\n\n```swift\nOAuth2Client().signOut(request: request) \n  .receive(on: yourQueue)\n  .sink(receiveCompletion: { (completion) in\n\n  }, receiveValue: { (credential) in\n    credential.save()\n  })\n```\n\n## Features\n\n- [x] Supporting OAuth 2.0 with PKCE\n- [x] Publish / refresh access token\n- [x] Combine interface\n\n## General notes for OAuth 2.0\n- Make sure setting callback url scheme on your setting\n\n## Supported platforms\n\n- macOS v11.0 and later\n- iOS / iPadOS v14.0 and later\n\n## Installation\n\nOnly support via Swift package manager installation.\n\n### Swift Package Manager\n\n```swift\ndependencies: [\n  .package(url: \"https://github.com/d-date/OAuth2Client.git\", from: \"0.1.0\")\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-date%2Foauth2client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-date%2Foauth2client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-date%2Foauth2client/lists"}