Skip to content

add created_at oauth scope (hq_official only) - #388

Merged
24c02 merged 2 commits into
mainfrom
add-created-at-scope
Dec 1, 2026
Merged

24c02 merged 2 commits into
mainfrom
add-created-at-scope

Conversation

@24c02

@24c02 24c02 commented Nov 18, 2026

Copy link
Copy Markdown
Member

adds a created_at scope so hq_official apps can check when someone registered.

what it does:

  • new created_at scope in OAuthScope::ALL, added to HQ_OFFICIAL_SCOPES (not community)
  • OIDC claim on both id_token and userinfo (ISO 8601)
  • REST API identity response includes created_at when scope is granted
  • consent screen shows "See when you joined Hack Club" with the formatted date
  • documented in API docs table + OIDC guide custom scopes table

access control — no new restriction code needed:

  • ProgramPolicy#allowed_scopes already gates by trust level
  • Program#validate_community_scopes rejects it on non-hq_official apps
  • doorkeeper blocks it at authorization time if not in app's scope set

ref: INFR#42106

- new scope exposing identity.created_at to hq_official apps
- OIDC claim (id_token + userinfo) in ISO 8601
- REST API identity response, scope-gated
- consent screen field shows formatted join date
- documented in API docs + OIDC guide
@24c02
24c02 merged commit af6c8b5 into main Dec 1, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant