@atproto/oauth-provider-api 0.0.0-spaces-alpha-20260818021221
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +280 -0
- package/LICENSE.txt +7 -0
- package/dist/api-endpoints.d.ts +338 -0
- package/dist/api-endpoints.d.ts.map +1 -0
- package/dist/api-endpoints.js +2 -0
- package/dist/api-endpoints.js.map +1 -0
- package/dist/contants.d.ts +4 -0
- package/dist/contants.d.ts.map +1 -0
- package/dist/contants.js +4 -0
- package/dist/contants.js.map +1 -0
- package/dist/customization-data.d.ts +11 -0
- package/dist/customization-data.d.ts.map +1 -0
- package/dist/customization-data.js +2 -0
- package/dist/customization-data.js.map +1 -0
- package/dist/errors.d.ts +4 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +16 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +36 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +40 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
# @atproto/oauth-provider-api
|
|
2
|
+
|
|
3
|
+
## 0.0.0-spaces-alpha-20260818021221
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`2f77206`](https://github.com/bluesky-social/atproto/commit/2f77206ff8010710db5733c454abff9eb5ebb96b)]:
|
|
8
|
+
- @atproto/syntax@0.0.0-spaces-alpha-20260818021221
|
|
9
|
+
|
|
10
|
+
## 0.7.9
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`8b55a4a`](https://github.com/bluesky-social/atproto/commit/8b55a4ab69c24e5038f67c479b3b9953666ea0c2)]:
|
|
15
|
+
- @atproto/syntax@0.7.4
|
|
16
|
+
|
|
17
|
+
## 0.7.8
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [[`6a3d607`](https://github.com/bluesky-social/atproto/commit/6a3d6073cb66c527b5b109242049c85c36b9658c)]:
|
|
22
|
+
- @atproto/syntax@0.7.3
|
|
23
|
+
|
|
24
|
+
## 0.7.7
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- [#5273](https://github.com/bluesky-social/atproto/pull/5273) [`87e6a95`](https://github.com/bluesky-social/atproto/commit/87e6a95c39f199e53b6a68b7d1fa23fbe8459753) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Fix a bug that would cause oauth session not recently refreshed not to be listed in the UI.
|
|
29
|
+
|
|
30
|
+
## 0.7.6
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Updated dependencies [[`9e1da84`](https://github.com/bluesky-social/atproto/commit/9e1da84cc00a1cc5b453705539a2766403f3ee55)]:
|
|
35
|
+
- @atproto/syntax@0.7.2
|
|
36
|
+
|
|
37
|
+
## 0.7.5
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Updated dependencies [[`a0c49d9`](https://github.com/bluesky-social/atproto/commit/a0c49d9e8bc685c5a747a8d3b2775c73c63fdb6f)]:
|
|
42
|
+
- @atproto/oauth-types@0.7.5
|
|
43
|
+
- @atproto/jwk@0.7.4
|
|
44
|
+
- @atproto/syntax@0.7.1
|
|
45
|
+
|
|
46
|
+
## 0.7.4
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- Updated dependencies [[`d1be0ce`](https://github.com/bluesky-social/atproto/commit/d1be0cead444ef95e64cac5ea5318edbec9d8112), [`d79f6d5`](https://github.com/bluesky-social/atproto/commit/d79f6d59a073c05cc37bd0d1482beeea482b67ed)]:
|
|
51
|
+
- @atproto/syntax@0.7.0
|
|
52
|
+
|
|
53
|
+
## 0.7.3
|
|
54
|
+
|
|
55
|
+
### Patch Changes
|
|
56
|
+
|
|
57
|
+
- [#5099](https://github.com/bluesky-social/atproto/pull/5099) [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update TypeScript build to rely on references to composite internal projects
|
|
58
|
+
|
|
59
|
+
- [#5099](https://github.com/bluesky-social/atproto/pull/5099) [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Bundle only necessary files in the NPM tarball, including the `CHANGELOG.md` and `README.md` files (if present).
|
|
60
|
+
|
|
61
|
+
- [#5099](https://github.com/bluesky-social/atproto/pull/5099) [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Build with `noImplicitAny` enabled
|
|
62
|
+
|
|
63
|
+
- Updated dependencies [[`28a0b58`](https://github.com/bluesky-social/atproto/commit/28a0b588147863eaef948cd2bb8fc0f19d08cda9), [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07), [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07), [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07), [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07)]:
|
|
64
|
+
- @atproto/syntax@0.6.4
|
|
65
|
+
- @atproto/oauth-types@0.7.4
|
|
66
|
+
- @atproto/jwk@0.7.3
|
|
67
|
+
|
|
68
|
+
## 0.7.2
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- [#5151](https://github.com/bluesky-social/atproto/pull/5151) [`a51c45d`](https://github.com/bluesky-social/atproto/commit/a51c45d38f6bd7b8765f640e564cf921d52162e7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update dependencies
|
|
73
|
+
|
|
74
|
+
- Updated dependencies [[`a51c45d`](https://github.com/bluesky-social/atproto/commit/a51c45d38f6bd7b8765f640e564cf921d52162e7)]:
|
|
75
|
+
- @atproto/jwk@0.7.2
|
|
76
|
+
- @atproto/oauth-types@0.7.3
|
|
77
|
+
- @atproto/syntax@0.6.3
|
|
78
|
+
|
|
79
|
+
## 0.7.1
|
|
80
|
+
|
|
81
|
+
### Patch Changes
|
|
82
|
+
|
|
83
|
+
- [#5140](https://github.com/bluesky-social/atproto/pull/5140) [`0b165ca`](https://github.com/bluesky-social/atproto/commit/0b165ca96c460d3a30207f81e13eebfe9e8c7a1c) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add `deleteAfter` field to account deactivation data
|
|
84
|
+
|
|
85
|
+
## 0.7.0
|
|
86
|
+
|
|
87
|
+
### Minor Changes
|
|
88
|
+
|
|
89
|
+
- [#5053](https://github.com/bluesky-social/atproto/pull/5053) [`9acd39b`](https://github.com/bluesky-social/atproto/commit/9acd39b22ead6c0c56428297de425bd2b9a3c61f) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update `Account` properties to contain strongly typed `did`
|
|
90
|
+
|
|
91
|
+
- [#5053](https://github.com/bluesky-social/atproto/pull/5053) [`9acd39b`](https://github.com/bluesky-social/atproto/commit/9acd39b22ead6c0c56428297de425bd2b9a3c61f) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update interfaces to use did instead of sub
|
|
92
|
+
|
|
93
|
+
- [#5053](https://github.com/bluesky-social/atproto/pull/5053) [`9acd39b`](https://github.com/bluesky-social/atproto/commit/9acd39b22ead6c0c56428297de425bd2b9a3c61f) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add ability to deactivate and delete account from the account manager interface
|
|
94
|
+
|
|
95
|
+
### Patch Changes
|
|
96
|
+
|
|
97
|
+
- [#5053](https://github.com/bluesky-social/atproto/pull/5053) [`9acd39b`](https://github.com/bluesky-social/atproto/commit/9acd39b22ead6c0c56428297de425bd2b9a3c61f) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove unused `consentRequired` logic from OAuth consent flow UI
|
|
98
|
+
|
|
99
|
+
## 0.6.2
|
|
100
|
+
|
|
101
|
+
### Patch Changes
|
|
102
|
+
|
|
103
|
+
- [#4967](https://github.com/bluesky-social/atproto/pull/4967) [`9fc720c`](https://github.com/bluesky-social/atproto/commit/9fc720ce75f3ee88a5e48a9be919b07c7647f6f5) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Use TypeScript 7 to build package
|
|
104
|
+
|
|
105
|
+
- Updated dependencies [[`9fc720c`](https://github.com/bluesky-social/atproto/commit/9fc720ce75f3ee88a5e48a9be919b07c7647f6f5)]:
|
|
106
|
+
- @atproto/oauth-types@0.7.2
|
|
107
|
+
- @atproto/jwk@0.7.1
|
|
108
|
+
|
|
109
|
+
## 0.6.1
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- [#4986](https://github.com/bluesky-social/atproto/pull/4986) [`6c63f7d`](https://github.com/bluesky-social/atproto/commit/6c63f7dca6d37c22a8dd5d579ad6a72e532fc372) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add ability to change the user handle through the account manager interface
|
|
114
|
+
|
|
115
|
+
## 0.6.0
|
|
116
|
+
|
|
117
|
+
### Minor Changes
|
|
118
|
+
|
|
119
|
+
- [#4883](https://github.com/bluesky-social/atproto/pull/4883) [`64f5148`](https://github.com/bluesky-social/atproto/commit/64f5148ad8dcd669f77a9e022bd2622b2e594e0d) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add support for email verification and management in the account management interface
|
|
120
|
+
|
|
121
|
+
## 0.5.0
|
|
122
|
+
|
|
123
|
+
### Minor Changes
|
|
124
|
+
|
|
125
|
+
- [#4929](https://github.com/bluesky-social/atproto/pull/4929) [`f01c59f`](https://github.com/bluesky-social/atproto/commit/f01c59f5bd3f75fb8b47a9eecd4858b84033fb7c) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** Drop support for Node.js 18 and 20. Node.js 22 is now the minimum supported version. Docker images now use Node.js 24.
|
|
126
|
+
|
|
127
|
+
- [#4943](https://github.com/bluesky-social/atproto/pull/4943) [`c459153`](https://github.com/bluesky-social/atproto/commit/c459153395a30ce89e050892c8fab7dc98e019b9) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** Convert to pure ESM. All packages now ship `"type": "module"` with ES module output and Node16 module resolution.
|
|
128
|
+
|
|
129
|
+
Node.js 22's `require()` compatibility layer can still load these packages in CommonJS code.
|
|
130
|
+
|
|
131
|
+
- [#4930](https://github.com/bluesky-social/atproto/pull/4930) [`908bece`](https://github.com/bluesky-social/atproto/commit/908bece169258bff5ad121e5eec157d6ded6f705) Thanks [@devinivy](https://github.com/devinivy)! - Build with TypeScript 6.0.
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- Updated dependencies [[`f01c59f`](https://github.com/bluesky-social/atproto/commit/f01c59f5bd3f75fb8b47a9eecd4858b84033fb7c), [`c459153`](https://github.com/bluesky-social/atproto/commit/c459153395a30ce89e050892c8fab7dc98e019b9), [`908bece`](https://github.com/bluesky-social/atproto/commit/908bece169258bff5ad121e5eec157d6ded6f705)]:
|
|
136
|
+
- @atproto/jwk@0.7.0
|
|
137
|
+
- @atproto/oauth-types@0.7.0
|
|
138
|
+
|
|
139
|
+
## 0.4.0
|
|
140
|
+
|
|
141
|
+
### Minor Changes
|
|
142
|
+
|
|
143
|
+
- [#4820](https://github.com/bluesky-social/atproto/pull/4820) [`b3ce11a`](https://github.com/bluesky-social/atproto/commit/b3ce11ae2e965f239db6aec6054f069d557f4d55) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Unify account management and authorization pages into a signle package
|
|
144
|
+
|
|
145
|
+
### Patch Changes
|
|
146
|
+
|
|
147
|
+
- [#4820](https://github.com/bluesky-social/atproto/pull/4820) [`b3ce11a`](https://github.com/bluesky-social/atproto/commit/b3ce11ae2e965f239db6aec6054f069d557f4d55) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Account management interface improvements
|
|
148
|
+
|
|
149
|
+
## 0.3.7
|
|
150
|
+
|
|
151
|
+
### Patch Changes
|
|
152
|
+
|
|
153
|
+
- Updated dependencies []:
|
|
154
|
+
- @atproto/oauth-types@0.6.2
|
|
155
|
+
|
|
156
|
+
## 0.3.6
|
|
157
|
+
|
|
158
|
+
### Patch Changes
|
|
159
|
+
|
|
160
|
+
- Updated dependencies []:
|
|
161
|
+
- @atproto/oauth-types@0.6.1
|
|
162
|
+
|
|
163
|
+
## 0.3.5
|
|
164
|
+
|
|
165
|
+
### Patch Changes
|
|
166
|
+
|
|
167
|
+
- Updated dependencies [[`95ef3c2`](https://github.com/bluesky-social/atproto/commit/95ef3c24e8072e9d49412950b033cb8607764ee0), [`5d8e7a6`](https://github.com/bluesky-social/atproto/commit/5d8e7a6588fc9e57e15d83d47bb45103205e3e41)]:
|
|
168
|
+
- @atproto/oauth-types@0.6.0
|
|
169
|
+
|
|
170
|
+
## 0.3.4
|
|
171
|
+
|
|
172
|
+
### Patch Changes
|
|
173
|
+
|
|
174
|
+
- Updated dependencies []:
|
|
175
|
+
- @atproto/oauth-types@0.5.2
|
|
176
|
+
|
|
177
|
+
## 0.3.3
|
|
178
|
+
|
|
179
|
+
### Patch Changes
|
|
180
|
+
|
|
181
|
+
- Updated dependencies []:
|
|
182
|
+
- @atproto/oauth-types@0.5.1
|
|
183
|
+
|
|
184
|
+
## 0.3.2
|
|
185
|
+
|
|
186
|
+
### Patch Changes
|
|
187
|
+
|
|
188
|
+
- Updated dependencies [[`8ff5ec4ca`](https://github.com/bluesky-social/atproto/commit/8ff5ec4caa9a1f5c1e453a416ba2af22d1ee4f58), [`8ff5ec4ca`](https://github.com/bluesky-social/atproto/commit/8ff5ec4caa9a1f5c1e453a416ba2af22d1ee4f58), [`8ff5ec4ca`](https://github.com/bluesky-social/atproto/commit/8ff5ec4caa9a1f5c1e453a416ba2af22d1ee4f58)]:
|
|
189
|
+
- @atproto/oauth-types@0.5.0
|
|
190
|
+
|
|
191
|
+
## 0.3.1
|
|
192
|
+
|
|
193
|
+
### Patch Changes
|
|
194
|
+
|
|
195
|
+
- Updated dependencies [[`09439d7d6`](https://github.com/bluesky-social/atproto/commit/09439d7d688294ad1a0c78a74b901ba2f7c5f4c3), [`f560cf226`](https://github.com/bluesky-social/atproto/commit/f560cf2266715666ce5852ab095fcfb3876ae815), [`fefe70126`](https://github.com/bluesky-social/atproto/commit/fefe70126d0ea82507ac750f669b3478290f186b), [`f560cf226`](https://github.com/bluesky-social/atproto/commit/f560cf2266715666ce5852ab095fcfb3876ae815), [`f560cf226`](https://github.com/bluesky-social/atproto/commit/f560cf2266715666ce5852ab095fcfb3876ae815), [`09439d7d6`](https://github.com/bluesky-social/atproto/commit/09439d7d688294ad1a0c78a74b901ba2f7c5f4c3), [`f560cf226`](https://github.com/bluesky-social/atproto/commit/f560cf2266715666ce5852ab095fcfb3876ae815), [`09439d7d6`](https://github.com/bluesky-social/atproto/commit/09439d7d688294ad1a0c78a74b901ba2f7c5f4c3)]:
|
|
196
|
+
- @atproto/oauth-types@0.4.2
|
|
197
|
+
- @atproto/jwk@0.6.0
|
|
198
|
+
|
|
199
|
+
## 0.3.0
|
|
200
|
+
|
|
201
|
+
### Minor Changes
|
|
202
|
+
|
|
203
|
+
- [`f4cb3e4d0`](https://github.com/bluesky-social/atproto/commit/f4cb3e4d0ac45e567fa14f79b99a84621fa89a56) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Adapt to UI to support permission set.
|
|
204
|
+
|
|
205
|
+
## 0.2.1
|
|
206
|
+
|
|
207
|
+
### Patch Changes
|
|
208
|
+
|
|
209
|
+
- Updated dependencies [[`8a88e2c15`](https://github.com/bluesky-social/atproto/commit/8a88e2c15451f5e8239400eeb277ad31d178b8e6), [`8a88e2c15`](https://github.com/bluesky-social/atproto/commit/8a88e2c15451f5e8239400eeb277ad31d178b8e6)]:
|
|
210
|
+
- @atproto/jwk@0.5.0
|
|
211
|
+
- @atproto/oauth-types@0.4.1
|
|
212
|
+
|
|
213
|
+
## 0.2.0
|
|
214
|
+
|
|
215
|
+
### Minor Changes
|
|
216
|
+
|
|
217
|
+
- [#3806](https://github.com/bluesky-social/atproto/pull/3806) [`1899b1fc1`](https://github.com/bluesky-social/atproto/commit/1899b1fc16bc5cd7bb930ec697898766c3a05add) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Adapt `AuthorizeData` backend injected data type
|
|
218
|
+
|
|
219
|
+
## 0.1.6
|
|
220
|
+
|
|
221
|
+
### Patch Changes
|
|
222
|
+
|
|
223
|
+
- Updated dependencies [[`3a1e010e1`](https://github.com/bluesky-social/atproto/commit/3a1e010e148476bfdc0028c37cafbce85a46605a), [`3a1e010e1`](https://github.com/bluesky-social/atproto/commit/3a1e010e148476bfdc0028c37cafbce85a46605a)]:
|
|
224
|
+
- @atproto/oauth-types@0.4.0
|
|
225
|
+
|
|
226
|
+
## 0.1.5
|
|
227
|
+
|
|
228
|
+
### Patch Changes
|
|
229
|
+
|
|
230
|
+
- Updated dependencies [[`90b4775fc`](https://github.com/bluesky-social/atproto/commit/90b4775fc9c6959171bc12b961ce9421cc14d6ee), [`90b4775fc`](https://github.com/bluesky-social/atproto/commit/90b4775fc9c6959171bc12b961ce9421cc14d6ee), [`90b4775fc`](https://github.com/bluesky-social/atproto/commit/90b4775fc9c6959171bc12b961ce9421cc14d6ee)]:
|
|
231
|
+
- @atproto/jwk@0.4.0
|
|
232
|
+
- @atproto/oauth-types@0.3.1
|
|
233
|
+
|
|
234
|
+
## 0.1.4
|
|
235
|
+
|
|
236
|
+
### Patch Changes
|
|
237
|
+
|
|
238
|
+
- Updated dependencies [[`349b59175`](https://github.com/bluesky-social/atproto/commit/349b59175e82ceb9500ae7c6a9a0b9b6aec9d1b6), [`349b59175`](https://github.com/bluesky-social/atproto/commit/349b59175e82ceb9500ae7c6a9a0b9b6aec9d1b6), [`349b59175`](https://github.com/bluesky-social/atproto/commit/349b59175e82ceb9500ae7c6a9a0b9b6aec9d1b6), [`349b59175`](https://github.com/bluesky-social/atproto/commit/349b59175e82ceb9500ae7c6a9a0b9b6aec9d1b6), [`349b59175`](https://github.com/bluesky-social/atproto/commit/349b59175e82ceb9500ae7c6a9a0b9b6aec9d1b6)]:
|
|
239
|
+
- @atproto/oauth-types@0.3.0
|
|
240
|
+
- @atproto/jwk@0.3.0
|
|
241
|
+
|
|
242
|
+
## 0.1.3
|
|
243
|
+
|
|
244
|
+
### Patch Changes
|
|
245
|
+
|
|
246
|
+
- Updated dependencies [[`3fa2ee3b6`](https://github.com/bluesky-social/atproto/commit/3fa2ee3b6a382709b10921da53e69a901bccbb05), [`a3b24ca77`](https://github.com/bluesky-social/atproto/commit/a3b24ca77ca24ac19b17cf9ee2a5ca9612ccf96c)]:
|
|
247
|
+
- @atproto/jwk@0.2.0
|
|
248
|
+
- @atproto/oauth-types@0.2.8
|
|
249
|
+
|
|
250
|
+
## 0.1.2
|
|
251
|
+
|
|
252
|
+
### Patch Changes
|
|
253
|
+
|
|
254
|
+
- Updated dependencies [[`a48b093f0`](https://github.com/bluesky-social/atproto/commit/a48b093f0ba3cf67b7abc50d309afcb336d8ead8)]:
|
|
255
|
+
- @atproto/oauth-types@0.2.7
|
|
256
|
+
|
|
257
|
+
## 0.1.1
|
|
258
|
+
|
|
259
|
+
### Patch Changes
|
|
260
|
+
|
|
261
|
+
- Updated dependencies [[`30f9b6690`](https://github.com/bluesky-social/atproto/commit/30f9b6690e0e2c5810772e94e631322b9d89c65a), [`30f9b6690`](https://github.com/bluesky-social/atproto/commit/30f9b6690e0e2c5810772e94e631322b9d89c65a)]:
|
|
262
|
+
- @atproto/oauth-types@0.2.6
|
|
263
|
+
|
|
264
|
+
## 0.1.0
|
|
265
|
+
|
|
266
|
+
### Minor Changes
|
|
267
|
+
|
|
268
|
+
- [#3659](https://github.com/bluesky-social/atproto/pull/3659) [`371e04aad`](https://github.com/bluesky-social/atproto/commit/371e04aad2a3e8ae3fe185ce15fc8eb051cab78e) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Various adaptations
|
|
269
|
+
|
|
270
|
+
### Patch Changes
|
|
271
|
+
|
|
272
|
+
- Updated dependencies [[`371e04aad`](https://github.com/bluesky-social/atproto/commit/371e04aad2a3e8ae3fe185ce15fc8eb051cab78e), [`26a077716`](https://github.com/bluesky-social/atproto/commit/26a07771673bf1090a61efb7c970235f0b2509fc)]:
|
|
273
|
+
- @atproto/oauth-types@0.2.5
|
|
274
|
+
- @atproto/jwk@0.1.5
|
|
275
|
+
|
|
276
|
+
## 0.0.1
|
|
277
|
+
|
|
278
|
+
### Patch Changes
|
|
279
|
+
|
|
280
|
+
- [#3640](https://github.com/bluesky-social/atproto/pull/3640) [`cc4122652`](https://github.com/bluesky-social/atproto/commit/cc4122652ed42ba55826c019d0ec57bf25df1ecd) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Exctracted types shared between OAuthProvider backand and it's UI into a separate package.
|
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Dual MIT/Apache-2.0 License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022-2026 Bluesky Social PBC, and Contributors
|
|
4
|
+
|
|
5
|
+
Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).
|
|
6
|
+
|
|
7
|
+
Downstream projects and end users may chose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import type { SignedJwt } from '@atproto/jwk';
|
|
2
|
+
import type { OAuthClientMetadata } from '@atproto/oauth-types';
|
|
3
|
+
import type { DatetimeString, DidString, HandleString } from '@atproto/syntax';
|
|
4
|
+
import type { Account, DeviceMetadata, ISODateString, Session } from './types.js';
|
|
5
|
+
export type { DidString };
|
|
6
|
+
export type ApiEndpoints = {
|
|
7
|
+
'/verify-handle-availability': {
|
|
8
|
+
method: 'POST';
|
|
9
|
+
input: VerifyHandleAvailabilityInput;
|
|
10
|
+
output: {
|
|
11
|
+
available: true;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
'/sign-up': {
|
|
15
|
+
method: 'POST';
|
|
16
|
+
input: SignUpInput;
|
|
17
|
+
output: SignUpOutput;
|
|
18
|
+
};
|
|
19
|
+
'/sign-in': {
|
|
20
|
+
method: 'POST';
|
|
21
|
+
input: SignInInput;
|
|
22
|
+
output: SignInOutput;
|
|
23
|
+
};
|
|
24
|
+
'/reset-password-request': {
|
|
25
|
+
method: 'POST';
|
|
26
|
+
input: InitiatePasswordResetInput;
|
|
27
|
+
output: {
|
|
28
|
+
success: true;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
'/reset-password-confirm': {
|
|
32
|
+
method: 'POST';
|
|
33
|
+
input: ConfirmResetPasswordInput;
|
|
34
|
+
output: {
|
|
35
|
+
success: true;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
'/sign-out': {
|
|
39
|
+
method: 'POST';
|
|
40
|
+
input: SignOutInput;
|
|
41
|
+
output: {
|
|
42
|
+
success: true;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Lists all the accounts that are currently active, on the current device.
|
|
47
|
+
*/
|
|
48
|
+
'/device-sessions': {
|
|
49
|
+
method: 'GET';
|
|
50
|
+
output: Session[];
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Lists all the active OAuth sessions (access/refresh tokens) that where
|
|
54
|
+
* issued to OAuth clients (apps).
|
|
55
|
+
*
|
|
56
|
+
* @NOTE can be revoked using the oauth revocation endpoint (json or form
|
|
57
|
+
* encoded)
|
|
58
|
+
*
|
|
59
|
+
* ```http
|
|
60
|
+
* POST /oauth/revoke
|
|
61
|
+
* Content-Type: application/x-www-form-urlencoded
|
|
62
|
+
*
|
|
63
|
+
* token=<tokenId>
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
'/oauth-sessions': {
|
|
67
|
+
method: 'GET';
|
|
68
|
+
params: OAuthSessionsInput;
|
|
69
|
+
output: OAuthSessionsOutput;
|
|
70
|
+
};
|
|
71
|
+
'/revoke-oauth-session': {
|
|
72
|
+
method: 'POST';
|
|
73
|
+
input: RevokeOAuthSessionInput;
|
|
74
|
+
output: {
|
|
75
|
+
success: true;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Lists all the sessions that are currently active for a particular user, on
|
|
80
|
+
* other devices.
|
|
81
|
+
*/
|
|
82
|
+
'/account-sessions': {
|
|
83
|
+
method: 'GET';
|
|
84
|
+
params: AccountSessionsInput;
|
|
85
|
+
output: AccountSessionsOutput;
|
|
86
|
+
};
|
|
87
|
+
'/revoke-account-session': {
|
|
88
|
+
method: 'POST';
|
|
89
|
+
input: RevokeAccountSessionInput;
|
|
90
|
+
output: {
|
|
91
|
+
success: true;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
'/update-email-request': {
|
|
95
|
+
method: 'POST';
|
|
96
|
+
input: InitiateEmailUpdateInput;
|
|
97
|
+
output: InitiateEmailUpdateOutput;
|
|
98
|
+
};
|
|
99
|
+
'/update-email-confirm': {
|
|
100
|
+
method: 'POST';
|
|
101
|
+
input: ConfirmEmailUpdateInput;
|
|
102
|
+
output: ConfirmEmailUpdateOutput;
|
|
103
|
+
};
|
|
104
|
+
'/verify-email-request': {
|
|
105
|
+
method: 'POST';
|
|
106
|
+
input: InitiateEmailVerificationInput;
|
|
107
|
+
output: {
|
|
108
|
+
success: true;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
'/verify-email-confirm': {
|
|
112
|
+
method: 'POST';
|
|
113
|
+
input: ConfirmEmailVerificationInput;
|
|
114
|
+
output: ConfirmEmailVerificationOutput;
|
|
115
|
+
};
|
|
116
|
+
'/update-handle': {
|
|
117
|
+
method: 'POST';
|
|
118
|
+
input: UpdateHandleInput;
|
|
119
|
+
output: UpdateHandleOutput;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Marks the account as deactivated. The account remains recoverable — the
|
|
123
|
+
* user can sign back in to reactivate via {@link ApiEndpoints['/reactivate-account']}.
|
|
124
|
+
* Profile, posts, feeds and lists are hidden across the network until then.
|
|
125
|
+
*/
|
|
126
|
+
'/deactivate-account': {
|
|
127
|
+
method: 'POST';
|
|
128
|
+
input: DeactivateAccountInput;
|
|
129
|
+
output: DeactivateAccountOutput;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Reactivates a previously-deactivated account. No-op when the account is
|
|
133
|
+
* already active.
|
|
134
|
+
*/
|
|
135
|
+
'/reactivate-account': {
|
|
136
|
+
method: 'POST';
|
|
137
|
+
input: ReactivateAccountInput;
|
|
138
|
+
output: ReactivateAccountOutput;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Initiates account deletion by sending a confirmation code to the account's
|
|
142
|
+
* email address. The account is NOT deleted until
|
|
143
|
+
* {@link ApiEndpoints['/delete-account-confirm']} is called with the matching
|
|
144
|
+
* token and the user's current password.
|
|
145
|
+
*/
|
|
146
|
+
'/delete-account-request': {
|
|
147
|
+
method: 'POST';
|
|
148
|
+
input: InitiateAccountDeletionInput;
|
|
149
|
+
output: {
|
|
150
|
+
success: true;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Confirms and finalizes account deletion. Requires both the email
|
|
155
|
+
* confirmation token issued by {@link ApiEndpoints['/delete-account-request']}
|
|
156
|
+
* and the user's current password. Deletion is irreversible.
|
|
157
|
+
*/
|
|
158
|
+
'/delete-account-confirm': {
|
|
159
|
+
method: 'POST';
|
|
160
|
+
input: ConfirmAccountDeletionInput;
|
|
161
|
+
output: {
|
|
162
|
+
success: true;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
'/consent': {
|
|
166
|
+
method: 'POST';
|
|
167
|
+
input: ConsentInput;
|
|
168
|
+
output: {
|
|
169
|
+
url: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
'/reject': {
|
|
173
|
+
method: 'POST';
|
|
174
|
+
input: RejectInput;
|
|
175
|
+
output: {
|
|
176
|
+
url: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* When a user signs in without the "remember me" option, the server returns an
|
|
182
|
+
* ephemeral token. When used as `Bearer` authorization header, the token will
|
|
183
|
+
* be used in order to authenticate the users in place of using the user's
|
|
184
|
+
* cookie based session (which are only created when "remember me" is checked).
|
|
185
|
+
*
|
|
186
|
+
* Only include this token in the `Authorization` header when making requests to
|
|
187
|
+
* the OAuth provider API, **FOR THE ACCOUNT IT WAS GENERATED FOR**.
|
|
188
|
+
*/
|
|
189
|
+
export type EphemeralToken = SignedJwt;
|
|
190
|
+
export type SignInInput = {
|
|
191
|
+
locale: string;
|
|
192
|
+
username: string;
|
|
193
|
+
password: string;
|
|
194
|
+
emailOtp?: string;
|
|
195
|
+
remember?: boolean;
|
|
196
|
+
};
|
|
197
|
+
export type SignInOutput = {
|
|
198
|
+
account: Account;
|
|
199
|
+
ephemeralToken?: EphemeralToken;
|
|
200
|
+
};
|
|
201
|
+
export type SignUpInput = {
|
|
202
|
+
locale: string;
|
|
203
|
+
handle: string;
|
|
204
|
+
email: string;
|
|
205
|
+
password: string;
|
|
206
|
+
inviteCode?: string;
|
|
207
|
+
hcaptchaToken?: string;
|
|
208
|
+
};
|
|
209
|
+
export type SignUpOutput = {
|
|
210
|
+
account: Account;
|
|
211
|
+
ephemeralToken?: EphemeralToken;
|
|
212
|
+
};
|
|
213
|
+
export type SignOutInput = {
|
|
214
|
+
did: DidString | DidString[];
|
|
215
|
+
};
|
|
216
|
+
export type InitiatePasswordResetInput = {
|
|
217
|
+
locale: string;
|
|
218
|
+
email: string;
|
|
219
|
+
};
|
|
220
|
+
export type ConfirmResetPasswordInput = {
|
|
221
|
+
token: string;
|
|
222
|
+
password: string;
|
|
223
|
+
};
|
|
224
|
+
export type InitiateEmailUpdateInput = {
|
|
225
|
+
did: DidString;
|
|
226
|
+
locale?: string;
|
|
227
|
+
};
|
|
228
|
+
export type InitiateEmailUpdateOutput = {
|
|
229
|
+
tokenRequired: boolean;
|
|
230
|
+
};
|
|
231
|
+
export type ConfirmEmailUpdateInput = {
|
|
232
|
+
did: DidString;
|
|
233
|
+
token?: string;
|
|
234
|
+
email: string;
|
|
235
|
+
locale?: string;
|
|
236
|
+
};
|
|
237
|
+
export type ConfirmEmailUpdateOutput = {
|
|
238
|
+
account: Account;
|
|
239
|
+
};
|
|
240
|
+
export type InitiateEmailVerificationInput = {
|
|
241
|
+
did: DidString;
|
|
242
|
+
locale?: string;
|
|
243
|
+
};
|
|
244
|
+
export type ConfirmEmailVerificationInput = {
|
|
245
|
+
did: DidString;
|
|
246
|
+
token: string;
|
|
247
|
+
email: string;
|
|
248
|
+
};
|
|
249
|
+
export type ConfirmEmailVerificationOutput = {
|
|
250
|
+
account: Account;
|
|
251
|
+
};
|
|
252
|
+
export type VerifyHandleAvailabilityInput = {
|
|
253
|
+
handle: HandleString;
|
|
254
|
+
};
|
|
255
|
+
export type UpdateHandleInput = {
|
|
256
|
+
did: DidString;
|
|
257
|
+
handle: HandleString;
|
|
258
|
+
};
|
|
259
|
+
export type UpdateHandleOutput = {
|
|
260
|
+
account: Account;
|
|
261
|
+
};
|
|
262
|
+
export type DeactivateAccountInput = {
|
|
263
|
+
did: DidString;
|
|
264
|
+
deleteAfter?: DatetimeString;
|
|
265
|
+
};
|
|
266
|
+
export type DeactivateAccountOutput = {
|
|
267
|
+
account: Account;
|
|
268
|
+
};
|
|
269
|
+
export type ReactivateAccountInput = {
|
|
270
|
+
did: DidString;
|
|
271
|
+
};
|
|
272
|
+
export type ReactivateAccountOutput = {
|
|
273
|
+
account: Account;
|
|
274
|
+
};
|
|
275
|
+
export type InitiateAccountDeletionInput = {
|
|
276
|
+
did: DidString;
|
|
277
|
+
locale?: string;
|
|
278
|
+
};
|
|
279
|
+
export type ConfirmAccountDeletionInput = {
|
|
280
|
+
did: DidString;
|
|
281
|
+
token: string;
|
|
282
|
+
password: string;
|
|
283
|
+
};
|
|
284
|
+
export type RevokeAccountSessionInput = {
|
|
285
|
+
did: DidString;
|
|
286
|
+
deviceId: string;
|
|
287
|
+
};
|
|
288
|
+
export type OAuthSessionsInput = {
|
|
289
|
+
did: DidString;
|
|
290
|
+
};
|
|
291
|
+
export type OAuthSessionsOutput = ActiveOAuthSession[];
|
|
292
|
+
export type AccountSessionsInput = {
|
|
293
|
+
did: DidString;
|
|
294
|
+
};
|
|
295
|
+
export type AccountSessionsOutput = ActiveAccountSession[];
|
|
296
|
+
export type RevokeOAuthSessionInput = {
|
|
297
|
+
did: DidString;
|
|
298
|
+
tokenId: string;
|
|
299
|
+
};
|
|
300
|
+
export type ConsentInput = {
|
|
301
|
+
did: DidString;
|
|
302
|
+
scope?: string;
|
|
303
|
+
};
|
|
304
|
+
export type RejectInput = Record<string, never>;
|
|
305
|
+
/**
|
|
306
|
+
* Represents an account that is currently signed-in to the Authorization
|
|
307
|
+
* Server. If the session was created too long ago, the user may be required to
|
|
308
|
+
* re-authenticate ({@link ActiveDeviceSession.loginRequired}).
|
|
309
|
+
*/
|
|
310
|
+
export type ActiveDeviceSession = {
|
|
311
|
+
account: Account;
|
|
312
|
+
/**
|
|
313
|
+
* The session is too old and the user must re-authenticate.
|
|
314
|
+
*/
|
|
315
|
+
loginRequired: boolean;
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* Represents another device on which an account is currently signed-in.
|
|
319
|
+
*/
|
|
320
|
+
export type ActiveAccountSession = {
|
|
321
|
+
deviceId: string;
|
|
322
|
+
deviceMetadata: DeviceMetadata;
|
|
323
|
+
isCurrentDevice: boolean;
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* Represents an active OAuth session (access token).
|
|
327
|
+
*/
|
|
328
|
+
export type ActiveOAuthSession = {
|
|
329
|
+
tokenId: string;
|
|
330
|
+
createdAt: ISODateString;
|
|
331
|
+
updatedAt: ISODateString;
|
|
332
|
+
active: boolean;
|
|
333
|
+
clientId: string;
|
|
334
|
+
/** An "undefined" value means that the client metadata could not be fetched */
|
|
335
|
+
clientMetadata?: OAuthClientMetadata;
|
|
336
|
+
scope?: string;
|
|
337
|
+
};
|
|
338
|
+
//# sourceMappingURL=api-endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-endpoints.d.ts","sourceRoot":"","sources":["../src/api-endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,KAAK,EACV,OAAO,EACP,cAAc,EACd,aAAa,EACb,OAAO,EACR,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,SAAS,EAAE,CAAA;AAKzB,MAAM,MAAM,YAAY,GAAG;IACzB,6BAA6B,EAAE;QAC7B,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,6BAA6B,CAAA;QACpC,MAAM,EAAE;YAAE,SAAS,EAAE,IAAI,CAAA;SAAE,CAAA;KAC5B,CAAA;IACD,UAAU,EAAE;QACV,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,WAAW,CAAA;QAClB,MAAM,EAAE,YAAY,CAAA;KACrB,CAAA;IACD,UAAU,EAAE;QACV,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,WAAW,CAAA;QAClB,MAAM,EAAE,YAAY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AAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,cAAc,CAAA;IAE9B,eAAe,EAAE,OAAO,CAAA;CACzB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,MAAM,CAAA;IAEf,SAAS,EAAE,aAAa,CAAA;IACxB,SAAS,EAAE,aAAa,CAAA;IAExB,MAAM,EAAE,OAAO,CAAA;IAEf,QAAQ,EAAE,MAAM,CAAA;IAChB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,mBAAmB,CAAA;IAEpC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-endpoints.js","sourceRoot":"","sources":["../src/api-endpoints.ts"],"names":[],"mappings":"","sourcesContent":["import type { SignedJwt } from '@atproto/jwk'\nimport type { OAuthClientMetadata } from '@atproto/oauth-types'\nimport type { DatetimeString, DidString, HandleString } from '@atproto/syntax'\nimport type {\n Account,\n DeviceMetadata,\n ISODateString,\n Session,\n} from './types.js'\n\nexport type { DidString }\n\n// These are the endpoints implemented by the OAuth provider, for its UI to\n// call.\n\nexport type ApiEndpoints = {\n '/verify-handle-availability': {\n method: 'POST'\n input: VerifyHandleAvailabilityInput\n output: { available: true }\n }\n '/sign-up': {\n method: 'POST'\n input: SignUpInput\n output: SignUpOutput\n }\n '/sign-in': {\n method: 'POST'\n input: SignInInput\n output: SignInOutput\n }\n '/reset-password-request': {\n method: 'POST'\n input: InitiatePasswordResetInput\n output: { success: true }\n }\n '/reset-password-confirm': {\n method: 'POST'\n input: ConfirmResetPasswordInput\n output: { success: true }\n }\n '/sign-out': {\n method: 'POST'\n input: SignOutInput\n output: { success: true }\n }\n /**\n * Lists all the accounts that are currently active, on the current device.\n */\n '/device-sessions': {\n method: 'GET'\n output: Session[]\n }\n /**\n * Lists all the active OAuth sessions (access/refresh tokens) that where\n * issued to OAuth clients (apps).\n *\n * @NOTE can be revoked using the oauth revocation endpoint (json or form\n * encoded)\n *\n * ```http\n * POST /oauth/revoke\n * Content-Type: application/x-www-form-urlencoded\n *\n * token=<tokenId>\n * ```\n */\n '/oauth-sessions': {\n method: 'GET'\n params: OAuthSessionsInput\n output: OAuthSessionsOutput\n }\n '/revoke-oauth-session': {\n method: 'POST'\n input: RevokeOAuthSessionInput\n output: { success: true }\n }\n /**\n * Lists all the sessions that are currently active for a particular user, on\n * other devices.\n */\n '/account-sessions': {\n method: 'GET'\n params: AccountSessionsInput\n output: AccountSessionsOutput\n }\n '/revoke-account-session': {\n method: 'POST'\n input: RevokeAccountSessionInput\n output: { success: true }\n }\n '/update-email-request': {\n method: 'POST'\n input: InitiateEmailUpdateInput\n output: InitiateEmailUpdateOutput\n }\n '/update-email-confirm': {\n method: 'POST'\n input: ConfirmEmailUpdateInput\n output: ConfirmEmailUpdateOutput\n }\n '/verify-email-request': {\n method: 'POST'\n input: InitiateEmailVerificationInput\n output: { success: true }\n }\n '/verify-email-confirm': {\n method: 'POST'\n input: ConfirmEmailVerificationInput\n output: ConfirmEmailVerificationOutput\n }\n '/update-handle': {\n method: 'POST'\n input: UpdateHandleInput\n output: UpdateHandleOutput\n }\n /**\n * Marks the account as deactivated. The account remains recoverable — the\n * user can sign back in to reactivate via {@link ApiEndpoints['/reactivate-account']}.\n * Profile, posts, feeds and lists are hidden across the network until then.\n */\n '/deactivate-account': {\n method: 'POST'\n input: DeactivateAccountInput\n output: DeactivateAccountOutput\n }\n /**\n * Reactivates a previously-deactivated account. No-op when the account is\n * already active.\n */\n '/reactivate-account': {\n method: 'POST'\n input: ReactivateAccountInput\n output: ReactivateAccountOutput\n }\n /**\n * Initiates account deletion by sending a confirmation code to the account's\n * email address. The account is NOT deleted until\n * {@link ApiEndpoints['/delete-account-confirm']} is called with the matching\n * token and the user's current password.\n */\n '/delete-account-request': {\n method: 'POST'\n input: InitiateAccountDeletionInput\n output: { success: true }\n }\n /**\n * Confirms and finalizes account deletion. Requires both the email\n * confirmation token issued by {@link ApiEndpoints['/delete-account-request']}\n * and the user's current password. Deletion is irreversible.\n */\n '/delete-account-confirm': {\n method: 'POST'\n input: ConfirmAccountDeletionInput\n output: { success: true }\n }\n '/consent': {\n method: 'POST'\n input: ConsentInput\n output: { url: string }\n }\n '/reject': {\n method: 'POST'\n input: RejectInput\n output: { url: string }\n }\n}\n\n/**\n * When a user signs in without the \"remember me\" option, the server returns an\n * ephemeral token. When used as `Bearer` authorization header, the token will\n * be used in order to authenticate the users in place of using the user's\n * cookie based session (which are only created when \"remember me\" is checked).\n *\n * Only include this token in the `Authorization` header when making requests to\n * the OAuth provider API, **FOR THE ACCOUNT IT WAS GENERATED FOR**.\n */\nexport type EphemeralToken = SignedJwt\n\nexport type SignInInput = {\n locale: string\n username: string\n password: string\n emailOtp?: string\n remember?: boolean\n}\n\nexport type SignInOutput = {\n account: Account\n ephemeralToken?: EphemeralToken\n}\n\nexport type SignUpInput = {\n locale: string\n handle: string\n email: string\n password: string\n inviteCode?: string\n hcaptchaToken?: string\n}\n\nexport type SignUpOutput = {\n account: Account\n ephemeralToken?: EphemeralToken\n}\n\nexport type SignOutInput = {\n did: DidString | DidString[]\n}\n\nexport type InitiatePasswordResetInput = {\n locale: string\n email: string\n}\n\nexport type ConfirmResetPasswordInput = {\n token: string\n password: string\n}\n\nexport type InitiateEmailUpdateInput = {\n did: DidString\n locale?: string\n}\n\nexport type InitiateEmailUpdateOutput = {\n tokenRequired: boolean\n}\n\nexport type ConfirmEmailUpdateInput = {\n did: DidString\n token?: string\n email: string\n locale?: string\n}\n\nexport type ConfirmEmailUpdateOutput = {\n account: Account\n}\n\nexport type InitiateEmailVerificationInput = {\n did: DidString\n locale?: string\n}\n\nexport type ConfirmEmailVerificationInput = {\n did: DidString\n token: string\n email: string\n}\n\nexport type ConfirmEmailVerificationOutput = {\n account: Account\n}\n\nexport type VerifyHandleAvailabilityInput = {\n handle: HandleString\n}\n\nexport type UpdateHandleInput = {\n did: DidString\n handle: HandleString\n}\n\nexport type UpdateHandleOutput = {\n account: Account\n}\n\nexport type DeactivateAccountInput = {\n did: DidString\n deleteAfter?: DatetimeString\n}\n\nexport type DeactivateAccountOutput = {\n account: Account\n}\n\nexport type ReactivateAccountInput = {\n did: DidString\n}\n\nexport type ReactivateAccountOutput = {\n account: Account\n}\n\nexport type InitiateAccountDeletionInput = {\n did: DidString\n locale?: string\n}\n\nexport type ConfirmAccountDeletionInput = {\n did: DidString\n token: string\n password: string\n}\n\nexport type RevokeAccountSessionInput = {\n did: DidString\n deviceId: string\n}\n\nexport type OAuthSessionsInput = {\n did: DidString\n}\n\nexport type OAuthSessionsOutput = ActiveOAuthSession[]\n\nexport type AccountSessionsInput = {\n did: DidString\n}\n\nexport type AccountSessionsOutput = ActiveAccountSession[]\n\nexport type RevokeOAuthSessionInput = {\n did: DidString\n tokenId: string\n}\n\nexport type ConsentInput = {\n did: DidString\n scope?: string\n}\n\nexport type RejectInput = Record<string, never>\n\n/**\n * Represents an account that is currently signed-in to the Authorization\n * Server. If the session was created too long ago, the user may be required to\n * re-authenticate ({@link ActiveDeviceSession.loginRequired}).\n */\nexport type ActiveDeviceSession = {\n account: Account\n\n /**\n * The session is too old and the user must re-authenticate.\n */\n loginRequired: boolean\n}\n\n/**\n * Represents another device on which an account is currently signed-in.\n */\nexport type ActiveAccountSession = {\n deviceId: string\n deviceMetadata: DeviceMetadata\n\n isCurrentDevice: boolean\n}\n\n/**\n * Represents an active OAuth session (access token).\n */\nexport type ActiveOAuthSession = {\n tokenId: string\n\n createdAt: ISODateString\n updatedAt: ISODateString\n\n active: boolean\n\n clientId: string\n /** An \"undefined\" value means that the client metadata could not be fetched */\n clientMetadata?: OAuthClientMetadata\n\n scope?: string\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contants.d.ts","sourceRoot":"","sources":["../src/contants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,eAAe,CAAA;AAC5C,eAAO,MAAM,gBAAgB,iBAAiB,CAAA;AAE9C,eAAO,MAAM,mBAAmB,kCAAkC,CAAA"}
|
package/dist/contants.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contants.js","sourceRoot":"","sources":["../src/contants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAA;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAA;AAE9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,+BAA+B,CAAA","sourcesContent":["export const CSRF_COOKIE_NAME = 'csrf-token'\nexport const CSRF_HEADER_NAME = 'x-csrf-token'\n\nexport const API_ENDPOINT_PREFIX = '/@atproto/oauth-provider/~api'\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LinkDefinition } from './types.js';
|
|
2
|
+
export type CustomizationData = {
|
|
3
|
+
hcaptchaSiteKey?: string;
|
|
4
|
+
inviteCodeRequired?: boolean;
|
|
5
|
+
availableUserDomains?: string[];
|
|
6
|
+
show2FaWarningOnEmailUpdate?: boolean;
|
|
7
|
+
name?: string;
|
|
8
|
+
logo?: string;
|
|
9
|
+
links?: LinkDefinition[];
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=customization-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customization-data.d.ts","sourceRoot":"","sources":["../src/customization-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAKhD,MAAM,MAAM,iBAAiB,GAAG;IAE9B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC/B,2BAA2B,CAAC,EAAE,OAAO,CAAA;IAGrC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,cAAc,EAAE,CAAA;CACzB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customization-data.js","sourceRoot":"","sources":["../src/customization-data.ts"],"names":[],"mappings":"","sourcesContent":["import type { LinkDefinition } from './types.js'\n\n// These are the types of the variables that are injected into the HTML by the\n// backend. They are used to configure the frontend.\n\nexport type CustomizationData = {\n // Functional customization\n hcaptchaSiteKey?: string\n inviteCodeRequired?: boolean\n availableUserDomains?: string[]\n show2FaWarningOnEmailUpdate?: boolean\n\n // Aesthetic customization\n name?: string\n logo?: string\n links?: LinkDefinition[]\n}\n"]}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const HANDLE_UNAVAILABLE_REASON: readonly ["syntax", "domain", "slur", "taken", "reserved", "resolution", "unsupported"];
|
|
2
|
+
export type HandleUnavailableReason = (typeof HANDLE_UNAVAILABLE_REASON)[number];
|
|
3
|
+
export declare const isHandleUnavailableReason: (value: unknown) => value is HandleUnavailableReason;
|
|
4
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,yFAQ3B,CAAA;AAEX,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhF,eAAO,MAAM,yBAAyB,UAC7B,OAAO,KACb,KAAK,IAAI,uBAEX,CAAA"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const HANDLE_UNAVAILABLE_REASON = Object.freeze([
|
|
2
|
+
'syntax',
|
|
3
|
+
'domain',
|
|
4
|
+
'slur',
|
|
5
|
+
'taken',
|
|
6
|
+
'reserved',
|
|
7
|
+
'resolution',
|
|
8
|
+
'unsupported',
|
|
9
|
+
]);
|
|
10
|
+
export const isHandleUnavailableReason = (value) => {
|
|
11
|
+
return HANDLE_UNAVAILABLE_REASON.includes(value);
|
|
12
|
+
};
|
|
13
|
+
// @TODO consider moving JsonErrorResponse & sub-classes here (or only the
|
|
14
|
+
// schemas?), allowing the same code to be used on both the server and client
|
|
15
|
+
// for error handling/parsing/formatting.
|
|
16
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC;IACrD,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,OAAO;IACP,UAAU;IACV,YAAY;IACZ,aAAa;CACL,CAAC,CAAA;AAIX,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,KAAc,EACoB,EAAE;IACpC,OAAQ,yBAAgD,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC1E,CAAC,CAAA;AAED,0EAA0E;AAC1E,6EAA6E;AAC7E,yCAAyC","sourcesContent":["export const HANDLE_UNAVAILABLE_REASON = Object.freeze([\n 'syntax',\n 'domain',\n 'slur',\n 'taken',\n 'reserved',\n 'resolution',\n 'unsupported',\n] as const)\n\nexport type HandleUnavailableReason = (typeof HANDLE_UNAVAILABLE_REASON)[number]\n\nexport const isHandleUnavailableReason = (\n value: unknown,\n): value is HandleUnavailableReason => {\n return (HANDLE_UNAVAILABLE_REASON as readonly unknown[]).includes(value)\n}\n\n// @TODO consider moving JsonErrorResponse & sub-classes here (or only the\n// schemas?), allowing the same code to be used on both the server and client\n// for error handling/parsing/formatting.\n"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,oBAAoB,CAAA;AACvC,mBAAmB,yBAAyB,CAAA;AAC5C,mBAAmB,YAAY,CAAA;AAE/B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA","sourcesContent":["export type * from './api-endpoints.js'\nexport type * from './customization-data.js'\nexport type * from './types.js'\n\nexport * from './contants.js'\nexport * from './errors.js'\n"]}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { DidString, HandleString } from '@atproto/syntax';
|
|
2
|
+
export type { DidString };
|
|
3
|
+
export type Account = {
|
|
4
|
+
did: DidString;
|
|
5
|
+
pds: DidString;
|
|
6
|
+
deactivated: boolean;
|
|
7
|
+
locale?: string;
|
|
8
|
+
email?: string;
|
|
9
|
+
emailVerified?: boolean;
|
|
10
|
+
name?: string;
|
|
11
|
+
handle?: HandleString;
|
|
12
|
+
picture?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Represents an account that is currently signed-in to the Authorization
|
|
16
|
+
* Server. If the session was created too long ago, the user may be required to
|
|
17
|
+
* re-authenticate ({@link Session.loginRequired}).
|
|
18
|
+
*/
|
|
19
|
+
export type Session = {
|
|
20
|
+
account: Account;
|
|
21
|
+
info?: never;
|
|
22
|
+
loginRequired: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type MultiLangString = Record<string, string | undefined>;
|
|
25
|
+
export type LinkDefinition = {
|
|
26
|
+
title: string | MultiLangString;
|
|
27
|
+
href: string;
|
|
28
|
+
rel?: string;
|
|
29
|
+
};
|
|
30
|
+
export type DeviceMetadata = {
|
|
31
|
+
userAgent: string | null;
|
|
32
|
+
ipAddress: string;
|
|
33
|
+
lastSeenAt: ISODateString;
|
|
34
|
+
};
|
|
35
|
+
export type ISODateString = `${string}T${string}Z`;
|
|
36
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9D,YAAY,EAAE,SAAS,EAAE,CAAA;AAEzB,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,SAAS,CAAA;IACd,GAAG,EAAE,SAAS,CAAA;IACd,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,KAAK,CAAA;IAEZ,aAAa,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;AAEhE,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,GAAG,eAAe,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,aAAa,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,GAAG,MAAM,IAAI,MAAM,GAAG,CAAA"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { DidString, HandleString } from '@atproto/syntax'\n\nexport type { DidString }\n\nexport type Account = {\n did: DidString\n pds: DidString\n deactivated: boolean\n locale?: string\n email?: string\n emailVerified?: boolean\n name?: string\n handle?: HandleString\n picture?: string\n}\n\n/**\n * Represents an account that is currently signed-in to the Authorization\n * Server. If the session was created too long ago, the user may be required to\n * re-authenticate ({@link Session.loginRequired}).\n */\nexport type Session = {\n account: Account\n info?: never // Prevent relying on this in the frontend\n\n loginRequired: boolean\n}\n\nexport type MultiLangString = Record<string, string | undefined>\n\nexport type LinkDefinition = {\n title: string | MultiLangString\n href: string\n rel?: string\n}\n\nexport type DeviceMetadata = {\n userAgent: string | null\n ipAddress: string\n lastSeenAt: ISODateString\n}\n\nexport type ISODateString = `${string}T${string}Z`\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atproto/oauth-provider-api",
|
|
3
|
+
"version": "0.0.0-spaces-alpha-20260818021221",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Shared data types for the @atproto/oauth-provider and @atproto/oauth-provider-ui packages",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"atproto",
|
|
8
|
+
"oauth",
|
|
9
|
+
"provider",
|
|
10
|
+
"types"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://atproto.com",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/bluesky-social/atproto",
|
|
16
|
+
"directory": "packages/oauth/oauth-provider-api"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"./dist",
|
|
20
|
+
"./CHANGELOG.md"
|
|
21
|
+
],
|
|
22
|
+
"type": "module",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"default": "./dist/index.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=22"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@atproto/syntax": "^0.0.0-spaces-alpha-20260818021221",
|
|
34
|
+
"@atproto/jwk": "^0.7.4",
|
|
35
|
+
"@atproto/oauth-types": "^0.7.5"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc --build tsconfig.build.json"
|
|
39
|
+
}
|
|
40
|
+
}
|