# p2/OAuth2

OAuth2 framework for macOS and iOS, written in Swift.

Repository: https://github.com/p2/OAuth2
Canonical: https://ross.abutalabs.com/products/p2-oauth2
Language: Swift
License: NOASSERTION
License Family: other
Topics: oauth2, oauth2-flow, oauth2-client, ios, macos, tvos
Last push: 2024-05-16T21:56:34+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4471, "days_push": 839, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1178, forks 282 (observed 2026-08-28T04:03:52.938584+00:00)

## What it is
A Swift framework implementing the OAuth2 protocol for macOS, iOS, and tvOS apps. It supports all OAuth2 flows including code grant, with keychain integration and configurable client settings.

## Use cases
- add oauth2 login to an ios app
- authenticate a macos app against github
- implement authorization code grant flow in swift
- handle oauth token storage in the keychain
- connect a tvos app to an oauth2 provider
- use universal links as oauth redirect uris

## When to choose
- building a native Apple-platform app that needs OAuth2 authentication
- you want keychain-backed token storage out of the box
- you need support for multiple OAuth2 grant types in Swift

## When to avoid
- you need OAuth for a non-Apple platform
- you need OIDC features beyond plain OAuth2
- your project targets Swift versions older than 5

## Facets
- artifact type: library
- maturity: maintenance
- function: auth, http-client
- domain: security, mobile-development, web-development, developer-tools
- platform: -
- tags: oauth2-client, tvos, keychain, apple-platforms, authorization-flows, ios, macos, swift

## Member repositories
- p2/OAuth2 (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:52.938584+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:26:07.572192+00:00, confidence not recorded.
  - readme: https://github.com/p2/OAuth2 (fetched 2026-08-28T04:03:52.938584+00:00, sha cd2c89aa90bc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
