Skip to content

Commit 826b50c

Browse files
committed
chore: add changeset for OAuth permissions feature
1 parent 064bddf commit 826b50c

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
"@hypercerts-org/sdk-core": minor
3+
---
4+
5+
feat(auth): add OAuth scopes and granular permissions system
6+
7+
Add comprehensive OAuth permissions system with support for granular permissions and easy email access:
8+
9+
**Permission System**
10+
- Zod schemas for all ATProto permission types (account, repo, blob, rpc, identity, include)
11+
- Support for both transitional (legacy) and granular permission models
12+
- Type-safe permission builder with fluent API
13+
- 14 pre-built scope presets (EMAIL_READ, POSTING_APP, FULL_ACCESS, etc.)
14+
- 8 utility functions for working with scopes
15+
16+
**Email Access**
17+
- New `getAccountEmail()` method to retrieve user email from authenticated session
18+
- Returns null when permission not granted
19+
- Comprehensive error handling
20+
21+
**Enhanced OAuth Integration**
22+
- Automatic scope validation with helpful warnings
23+
- Migration suggestions from transitional to granular permissions
24+
- Improved documentation with comprehensive examples
25+
26+
**Breaking Changes**: None - fully backward compatible
27+
28+
**New Exports**:
29+
- `PermissionBuilder` - Fluent API for building type-safe scopes
30+
- `ScopePresets` - 14 ready-to-use permission presets
31+
- Utility functions: `buildScope()`, `parseScope()`, `hasPermission()`, `validateScope()`, etc.
32+
- Permission schemas and types for TypeScript consumers
33+
34+
See README for usage examples and migration guide.

0 commit comments

Comments
 (0)