@atcute/oauth-browser-client 2.0.2 → 2.0.3
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/README.md +86 -236
- package/dist/agents/user-agent.js +2 -2
- package/dist/agents/user-agent.js.map +1 -1
- package/dist/resolvers.js +2 -2
- package/dist/resolvers.js.map +1 -1
- package/lib/agents/user-agent.ts +2 -2
- package/lib/resolvers.ts +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,32 +1,47 @@
|
|
|
1
1
|
# @atcute/oauth-browser-client
|
|
2
2
|
|
|
3
|
-
minimal OAuth browser client
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
minimal OAuth browser client for AT Protocol.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install @atcute/oauth-browser-client
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## client metadata
|
|
10
|
+
|
|
11
|
+
your app needs an OAuth client metadata document hosted at a public URL. this tells authorization
|
|
12
|
+
servers about your app:
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"client_id": "https://example.com/oauth-client-metadata.json",
|
|
17
|
+
"client_name": "My App",
|
|
18
|
+
"client_uri": "https://example.com",
|
|
19
|
+
"redirect_uris": ["https://example.com/oauth/callback"],
|
|
20
|
+
"scope": "atproto transition:generic",
|
|
21
|
+
"grant_types": ["authorization_code", "refresh_token"],
|
|
22
|
+
"response_types": ["code"],
|
|
23
|
+
"token_endpoint_auth_method": "none",
|
|
24
|
+
"application_type": "web",
|
|
25
|
+
"dpop_bound_access_tokens": true
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
the `client_id` must be the URL where this document is hosted. see the
|
|
30
|
+
[OAuth client metadata spec](https://docs.bsky.app/docs/advanced-guides/oauth-client#client-metadata)
|
|
31
|
+
for all available fields.
|
|
16
32
|
|
|
17
33
|
## usage
|
|
18
34
|
|
|
19
|
-
###
|
|
35
|
+
### configuration
|
|
20
36
|
|
|
21
|
-
|
|
22
|
-
along with the resolvers that will be used to resolve and verify account details. this call should
|
|
23
|
-
be placed before any other calls you make with this library.
|
|
37
|
+
call `configureOAuth` before using any other functions from this library:
|
|
24
38
|
|
|
25
39
|
```ts
|
|
26
|
-
import { configureOAuth
|
|
40
|
+
import { configureOAuth } from '@atcute/oauth-browser-client';
|
|
27
41
|
|
|
28
42
|
import {
|
|
29
43
|
CompositeDidDocumentResolver,
|
|
44
|
+
LocalActorResolver,
|
|
30
45
|
PlcDidDocumentResolver,
|
|
31
46
|
WebDidDocumentResolver,
|
|
32
47
|
XrpcHandleResolver,
|
|
@@ -37,16 +52,8 @@ configureOAuth({
|
|
|
37
52
|
client_id: 'https://example.com/oauth-client-metadata.json',
|
|
38
53
|
redirect_uri: 'https://example.com/oauth/callback',
|
|
39
54
|
},
|
|
40
|
-
identityResolver:
|
|
41
|
-
// AT Protocol handles resolve via DNS TXT record or HTTP well-known endpoints.
|
|
42
|
-
// since web apps lack direct DNS access and face CORS restrictions, we're using
|
|
43
|
-
// Bluesky's AppView for this example.
|
|
44
|
-
//
|
|
45
|
-
// NOTE: Bluesky may log handle resolutions and requester info per their privacy
|
|
46
|
-
// policy. consider the privacy implications of this arrangement and change this
|
|
47
|
-
// setup if unsuitable for your use case.
|
|
55
|
+
identityResolver: new LocalActorResolver({
|
|
48
56
|
handleResolver: new XrpcHandleResolver({ serviceUrl: 'https://public.api.bsky.app' }),
|
|
49
|
-
|
|
50
57
|
didDocumentResolver: new CompositeDidDocumentResolver({
|
|
51
58
|
methods: {
|
|
52
59
|
plc: new PlcDidDocumentResolver(),
|
|
@@ -57,104 +64,61 @@ configureOAuth({
|
|
|
57
64
|
});
|
|
58
65
|
```
|
|
59
66
|
|
|
60
|
-
|
|
67
|
+
> [!NOTE]
|
|
68
|
+
> this example uses Bluesky's AppView for handle resolution since web apps lack direct DNS access.
|
|
69
|
+
> Bluesky may log handle resolutions per their privacy policy - consider the implications for your
|
|
70
|
+
> use case.
|
|
61
71
|
|
|
62
|
-
|
|
63
|
-
identifier or service along with the scope of the authorization, which should either match the one
|
|
64
|
-
in your client metadata, or a reduced set of it.
|
|
72
|
+
### starting authorization
|
|
65
73
|
|
|
66
74
|
```ts
|
|
67
75
|
import { createAuthorizationUrl } from '@atcute/oauth-browser-client';
|
|
68
76
|
|
|
69
77
|
const authUrl = await createAuthorizationUrl({
|
|
70
78
|
target: { type: 'account', identifier: 'mary.my.id' },
|
|
71
|
-
// or { type: 'pds', serviceUrl: 'https://bsky.social' }
|
|
72
79
|
scope: 'atproto transition:generic transition:chat.bsky',
|
|
73
80
|
});
|
|
74
81
|
|
|
75
|
-
|
|
76
|
-
await sleep(200);
|
|
77
|
-
|
|
78
|
-
// redirect the user to sign in and authorize the app
|
|
82
|
+
await sleep(200); // let browser persist local storage
|
|
79
83
|
window.location.assign(authUrl);
|
|
80
|
-
|
|
81
|
-
// if this is on an async function, ideally the function should never ever resolve.
|
|
82
|
-
// the only way it should resolve at this point is if the user aborted the authorization
|
|
83
|
-
// by returning back to this page (thanks to back-forward page caching)
|
|
84
|
-
await new Promise((_resolve, reject) => {
|
|
85
|
-
const listener = () => {
|
|
86
|
-
reject(new Error(`user aborted the login request`));
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
window.addEventListener('pageshow', listener, { once: true });
|
|
90
|
-
});
|
|
91
84
|
```
|
|
92
85
|
|
|
93
86
|
### finalizing authorization
|
|
94
87
|
|
|
95
|
-
|
|
96
|
-
parameters that have been provided.
|
|
88
|
+
on your redirect URL, extract the parameters and finalize:
|
|
97
89
|
|
|
98
90
|
```ts
|
|
99
91
|
import { XRPC } from '@atcute/client';
|
|
100
92
|
import { OAuthUserAgent, finalizeAuthorization } from '@atcute/oauth-browser-client';
|
|
101
93
|
|
|
102
|
-
//
|
|
103
|
-
// parameters assigned in the hash, not the search string.
|
|
94
|
+
// server redirects with params in hash, not search string
|
|
104
95
|
const params = new URLSearchParams(location.hash.slice(1));
|
|
105
96
|
|
|
106
|
-
//
|
|
107
|
-
// scrub it from history to prevent this authorization state to be replayed,
|
|
108
|
-
// just for good measure.
|
|
97
|
+
// scrub params from URL to prevent replay
|
|
109
98
|
history.replaceState(null, '', location.pathname + location.search);
|
|
110
99
|
|
|
111
|
-
|
|
112
|
-
const session = await finalizeAuthorization(params);
|
|
113
|
-
|
|
114
|
-
// now you can start making requests!
|
|
100
|
+
const { session } = await finalizeAuthorization(params);
|
|
115
101
|
const agent = new OAuthUserAgent(session);
|
|
102
|
+
const rpc = new XRPC({ handler: agent });
|
|
116
103
|
|
|
117
|
-
|
|
118
|
-
{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
const { data } = await rpc.get('com.atproto.identity.resolveHandle', {
|
|
122
|
-
params: {
|
|
123
|
-
handle: 'mary.my.id',
|
|
124
|
-
},
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
// or, use it directly!
|
|
129
|
-
{
|
|
130
|
-
const response = await agent.handle('/xrpc/com.atproto.identity.resolveHandle?handle=mary.my.id');
|
|
131
|
-
}
|
|
104
|
+
const { data } = await rpc.get('com.atproto.identity.resolveHandle', {
|
|
105
|
+
params: { handle: 'mary.my.id' },
|
|
106
|
+
});
|
|
132
107
|
```
|
|
133
108
|
|
|
134
|
-
the
|
|
135
|
-
|
|
136
|
-
who was last signed in for your own UI, as the sessions stored by the database is not guaranteed to
|
|
137
|
-
be permanent (mostly if they don't come with a refresh token.)
|
|
138
|
-
|
|
139
|
-
### resuming existing sessions
|
|
109
|
+
the session is persisted internally - don't store it elsewhere. track signed-in DIDs yourself for
|
|
110
|
+
your UI, as sessions without refresh tokens may expire.
|
|
140
111
|
|
|
141
|
-
|
|
142
|
-
resume.
|
|
112
|
+
### resuming sessions
|
|
143
113
|
|
|
144
114
|
```ts
|
|
145
|
-
import { XRPC } from '@atcute/client';
|
|
146
115
|
import { OAuthUserAgent, getSession } from '@atcute/oauth-browser-client';
|
|
147
116
|
|
|
148
117
|
const session = await getSession('did:plc:ia76kvnndjutgedggx2ibrem', { allowStale: true });
|
|
149
|
-
|
|
150
118
|
const agent = new OAuthUserAgent(session);
|
|
151
|
-
const rpc = new XRPC({ handler: agent });
|
|
152
119
|
```
|
|
153
120
|
|
|
154
|
-
###
|
|
155
|
-
|
|
156
|
-
you can manually remove sessions via `deleteStoredSession`, but ideally, you should revoke the token
|
|
157
|
-
first before doing so.
|
|
121
|
+
### signing out
|
|
158
122
|
|
|
159
123
|
```ts
|
|
160
124
|
import { OAuthUserAgent, deleteStoredSession, getSession } from '@atcute/oauth-browser-client';
|
|
@@ -164,32 +128,24 @@ const did = 'did:plc:ia76kvnndjutgedggx2ibrem';
|
|
|
164
128
|
try {
|
|
165
129
|
const session = await getSession(did, { allowStale: true });
|
|
166
130
|
const agent = new OAuthUserAgent(session);
|
|
167
|
-
|
|
168
131
|
await agent.signOut();
|
|
169
|
-
} catch
|
|
170
|
-
//
|
|
171
|
-
deleteStoredSession(did);
|
|
132
|
+
} catch {
|
|
133
|
+
deleteStoredSession(did); // fallback if signOut fails
|
|
172
134
|
}
|
|
173
135
|
```
|
|
174
136
|
|
|
175
|
-
## confidential client mode
|
|
176
|
-
|
|
177
|
-
by default, `@atcute/oauth-browser-client` operates as a **public client**, resulting in shorter
|
|
178
|
-
session lifetimes by authorization servers as it's deemed to be unable to securely store
|
|
179
|
-
credentials.
|
|
137
|
+
## confidential client mode
|
|
180
138
|
|
|
181
|
-
|
|
182
|
-
|
|
139
|
+
by default, this library operates as a **public client** with shorter session lifetimes. for
|
|
140
|
+
longer-lived sessions, set up a [client assertion backend][client-assertion-backend] to enable
|
|
141
|
+
**confidential client mode**.
|
|
183
142
|
|
|
184
143
|
[client-assertion-backend]: https://github.com/bluesky-social/proposals/tree/main/0010-client-assertion-backend
|
|
185
144
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
configure the client with a function to fetch client assertions from your backend:
|
|
145
|
+
add `fetchClientAssertion` to your config. the backend API is entirely up to you - this is just one
|
|
146
|
+
example:
|
|
189
147
|
|
|
190
148
|
```ts
|
|
191
|
-
import { configureOAuth } from '@atcute/oauth-browser-client';
|
|
192
|
-
|
|
193
149
|
configureOAuth({
|
|
194
150
|
// ... existing config
|
|
195
151
|
|
|
@@ -198,15 +154,11 @@ configureOAuth({
|
|
|
198
154
|
|
|
199
155
|
const response = await fetch('https://example.com/api/client-assertion', {
|
|
200
156
|
method: 'POST',
|
|
201
|
-
headers: {
|
|
202
|
-
dpop: dpop,
|
|
203
|
-
'content-type': 'application/json',
|
|
204
|
-
},
|
|
157
|
+
headers: { dpop, 'content-type': 'application/json' },
|
|
205
158
|
body: JSON.stringify({ jkt, aud }),
|
|
206
159
|
});
|
|
207
160
|
|
|
208
161
|
const data = await response.json();
|
|
209
|
-
|
|
210
162
|
return {
|
|
211
163
|
client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
|
|
212
164
|
client_assertion: data.assertion,
|
|
@@ -215,127 +167,41 @@ configureOAuth({
|
|
|
215
167
|
});
|
|
216
168
|
```
|
|
217
169
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
your backend needs to validate the incoming DPoP proof and sign a client assertion JWT with the
|
|
222
|
-
following interface:
|
|
223
|
-
|
|
224
|
-
```ts
|
|
225
|
-
interface ClientAssertionJwt {
|
|
226
|
-
/** your client ID */
|
|
227
|
-
iss: string;
|
|
228
|
-
/** also your client ID */
|
|
229
|
-
sub: string;
|
|
230
|
-
/** the authorization server receiving this token */
|
|
231
|
-
aud: string;
|
|
232
|
-
/** when this token expires */
|
|
233
|
-
exp: number;
|
|
234
|
-
/** unique nonce */
|
|
235
|
-
jti: string;
|
|
236
|
-
/** asserts that this jkt is allowed */
|
|
237
|
-
cnf: { jkt: string };
|
|
238
|
-
}
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
you're able to use the `jkt` to refuse assertions when necessary (suspicious activity, compromised
|
|
242
|
-
code, etc.)
|
|
243
|
-
|
|
244
|
-
### client metadata updates
|
|
245
|
-
|
|
246
|
-
your OAuth client metadata document must also be updated for confidential clients:
|
|
247
|
-
|
|
248
|
-
```json
|
|
249
|
-
{
|
|
250
|
-
"client_id": "https://example.com/oauth-client-metadata.json",
|
|
251
|
-
"client_name": "My App",
|
|
252
|
-
"redirect_uris": ["https://example.com/oauth/callback"],
|
|
253
|
-
"scope": "atproto transition:generic",
|
|
254
|
-
"token_endpoint_auth_method": "private_key_jwt",
|
|
255
|
-
"token_endpoint_auth_signing_alg": "ES256",
|
|
256
|
-
"jwks_uri": "https://example.com/oauth-jwks.json"
|
|
257
|
-
}
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
the `jwks_uri` should expose the public keys used to sign client assertions. it should return a JSON
|
|
261
|
-
Web Key Set (JWKS) document:
|
|
262
|
-
|
|
263
|
-
```json
|
|
264
|
-
{
|
|
265
|
-
"keys": [
|
|
266
|
-
{
|
|
267
|
-
"kty": "EC",
|
|
268
|
-
"crv": "P-256",
|
|
269
|
-
"x": "base64url-encoded-x-coordinate",
|
|
270
|
-
"y": "base64url-encoded-y-coordinate",
|
|
271
|
-
"use": "sig",
|
|
272
|
-
"kid": "key-identifier",
|
|
273
|
-
"alg": "ES256"
|
|
274
|
-
}
|
|
275
|
-
]
|
|
276
|
-
}
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
the public keys in the JWKS must correspond to the private keys your backend uses to sign client
|
|
280
|
-
assertions. multiple keys can be listed to support key rotation.
|
|
170
|
+
your backend validates the DPoP proof and signs a client assertion JWT containing `iss`, `sub` (both
|
|
171
|
+
your client ID), `aud` (authorization server), `exp`, `jti` (unique nonce), and `cnf: { jkt }` (the
|
|
172
|
+
allowed key thumbprint).
|
|
281
173
|
|
|
282
|
-
|
|
174
|
+
update your client metadata for confidential mode - replace `token_endpoint_auth_method` with
|
|
175
|
+
`private_key_jwt`, add `token_endpoint_auth_signing_alg: "ES256"`, and add a `jwks_uri` pointing to
|
|
176
|
+
your public keys.
|
|
283
177
|
|
|
284
|
-
|
|
178
|
+
## local development with Vite
|
|
285
179
|
|
|
286
|
-
|
|
287
|
-
your app in `localhost`, which is specifically forbidden by AT Protocol's OAuth, let's change it so
|
|
288
|
-
it'll always use `127.0.0.1`:
|
|
180
|
+
AT Protocol OAuth forbids `localhost` - use `127.0.0.1` instead:
|
|
289
181
|
|
|
290
182
|
```ts
|
|
291
|
-
|
|
183
|
+
// vite.config.ts
|
|
292
184
|
import { defineConfig } from 'vite';
|
|
185
|
+
import metadata from './public/oauth-client-metadata.json' with { type: 'json' };
|
|
293
186
|
|
|
294
187
|
const SERVER_HOST = '127.0.0.1';
|
|
295
188
|
const SERVER_PORT = 12520;
|
|
296
189
|
|
|
297
190
|
export default defineConfig({
|
|
298
|
-
server: {
|
|
299
|
-
host: SERVER_HOST,
|
|
300
|
-
port: SERVER_PORT,
|
|
301
|
-
},
|
|
302
|
-
});
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
additionally, to make it easier to develop locally and deploy to production, you should consider
|
|
306
|
-
adding a plugin that'll inject the necessary values for you through environment variables:
|
|
307
|
-
|
|
308
|
-
```ts
|
|
309
|
-
/// vite.config.ts
|
|
310
|
-
import metadata from './public/oauth-client-metadata.json' with { type: 'json' };
|
|
311
|
-
|
|
312
|
-
export default defineConfig({
|
|
313
|
-
// ...
|
|
314
|
-
|
|
191
|
+
server: { host: SERVER_HOST, port: SERVER_PORT },
|
|
315
192
|
plugins: [
|
|
316
|
-
// injects OAuth-related environment variables
|
|
317
193
|
{
|
|
318
194
|
config(_conf, { command }) {
|
|
319
195
|
if (command === 'build') {
|
|
320
196
|
process.env.VITE_OAUTH_CLIENT_ID = metadata.client_id;
|
|
321
197
|
process.env.VITE_OAUTH_REDIRECT_URI = metadata.redirect_uris[0];
|
|
322
198
|
} else {
|
|
323
|
-
const redirectUri = (
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
})();
|
|
327
|
-
|
|
328
|
-
const clientId =
|
|
329
|
-
`http://localhost` +
|
|
330
|
-
`?redirect_uri=${encodeURIComponent(redirectUri)}` +
|
|
199
|
+
const redirectUri = `http://${SERVER_HOST}:${SERVER_PORT}${new URL(metadata.redirect_uris[0]).pathname}`;
|
|
200
|
+
process.env.VITE_OAUTH_CLIENT_ID =
|
|
201
|
+
`http://localhost?redirect_uri=${encodeURIComponent(redirectUri)}` +
|
|
331
202
|
`&scope=${encodeURIComponent(metadata.scope)}`;
|
|
332
|
-
|
|
333
|
-
process.env.VITE_DEV_SERVER_PORT = '' + SERVER_PORT;
|
|
334
|
-
process.env.VITE_OAUTH_CLIENT_ID = clientId;
|
|
335
203
|
process.env.VITE_OAUTH_REDIRECT_URI = redirectUri;
|
|
336
204
|
}
|
|
337
|
-
|
|
338
|
-
process.env.VITE_CLIENT_URI = metadata.client_uri;
|
|
339
205
|
process.env.VITE_OAUTH_SCOPE = metadata.scope;
|
|
340
206
|
},
|
|
341
207
|
},
|
|
@@ -343,25 +209,7 @@ export default defineConfig({
|
|
|
343
209
|
});
|
|
344
210
|
```
|
|
345
211
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
```ts
|
|
349
|
-
/// src/vite-env.d.ts
|
|
350
|
-
|
|
351
|
-
interface ImportMetaEnv {
|
|
352
|
-
readonly VITE_DEV_SERVER_PORT?: string;
|
|
353
|
-
readonly VITE_CLIENT_URI: string;
|
|
354
|
-
readonly VITE_OAUTH_CLIENT_ID: string;
|
|
355
|
-
readonly VITE_OAUTH_REDIRECT_URI: string;
|
|
356
|
-
readonly VITE_OAUTH_SCOPE: string;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
interface ImportMeta {
|
|
360
|
-
readonly env: ImportMetaEnv;
|
|
361
|
-
}
|
|
362
|
-
```
|
|
363
|
-
|
|
364
|
-
et voilà! you can now use this to configure the client.
|
|
212
|
+
then use environment variables in your code:
|
|
365
213
|
|
|
366
214
|
```ts
|
|
367
215
|
configureOAuth({
|
|
@@ -371,13 +219,15 @@ configureOAuth({
|
|
|
371
219
|
},
|
|
372
220
|
// ...
|
|
373
221
|
});
|
|
374
|
-
|
|
375
|
-
// ... later during sign-in process
|
|
376
|
-
const authUrl = await createAuthorizationUrl({
|
|
377
|
-
// ...
|
|
378
|
-
scope: import.meta.env.VITE_OAUTH_SCOPE,
|
|
379
|
-
});
|
|
380
222
|
```
|
|
381
223
|
|
|
382
|
-
|
|
383
|
-
|
|
224
|
+
## caveats
|
|
225
|
+
|
|
226
|
+
- **minimal implementation**: only ES256 DPoP keys, requires PKCE and DPoP-bound PAR
|
|
227
|
+
- **no IndexedDB**: works in Safari lockdown mode but can't use non-exportable keys as [recommended
|
|
228
|
+
by DPoP spec][dpop-spec]
|
|
229
|
+
- **limited testing**: works in personal projects but consider the [reference
|
|
230
|
+
implementation][oauth-atproto-lib] for production
|
|
231
|
+
|
|
232
|
+
[dpop-spec]: https://datatracker.ietf.org/doc/html/rfc9449#section-2-4
|
|
233
|
+
[oauth-atproto-lib]: https://npm.im/@atproto/oauth-client-browser
|
|
@@ -40,7 +40,7 @@ export class OAuthUserAgent {
|
|
|
40
40
|
let session = this.session;
|
|
41
41
|
let url = new URL(pathname, session.info.aud);
|
|
42
42
|
headers.set('authorization', `${session.token.type} ${session.token.access}`);
|
|
43
|
-
let response = await this.#fetch(url, { ...init, headers });
|
|
43
|
+
let response = await this.#fetch(url.href, { ...init, headers });
|
|
44
44
|
if (!isInvalidTokenResponse(response)) {
|
|
45
45
|
return response;
|
|
46
46
|
}
|
|
@@ -61,7 +61,7 @@ export class OAuthUserAgent {
|
|
|
61
61
|
}
|
|
62
62
|
url = new URL(pathname, session.info.aud);
|
|
63
63
|
headers.set('authorization', `${session.token.type} ${session.token.access}`);
|
|
64
|
-
return await this.#fetch(url, { ...init, headers });
|
|
64
|
+
return await this.#fetch(url.href, { ...init, headers });
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
const isInvalidTokenResponse = (response) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-agent.js","sourceRoot":"","sources":["../../lib/agents/user-agent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAA0B,mBAAmB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAExF,MAAM,OAAO,cAAc;IAIP,OAAO;IAH1B,MAAM,CAAe;IACrB,kBAAkB,CAA+B;IAEjD,YAAmB,OAAgB,EAAE;uBAAlB,OAAO;QACzB,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAAA,CACtD;IAED,IAAI,GAAG,GAAQ;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;IAAA,CAC7B;IAED,UAAU,CAAC,OAA2B,EAAoB;QACzD,MAAM,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAE3D,OAAO;aACL,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;YAClB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAAA,CACvB,CAAC;aACD,OAAO,CAAC,GAAG,EAAE,CAAC;YACd,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;QAAA,CACpC,CAAC,CAAC;QAEJ,OAAO,CAAC,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,CAAC;IAAA,CAC3C;IAED,KAAK,CAAC,OAAO,GAAkB;QAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;QAElC,IAAI,CAAC;YACJ,MAAM,EAA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AAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAE9E,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAAA,CACzD;CACD;AAED,MAAM,sBAAsB,GAAG,CAAC,QAAkB,EAAE,EAAE,CAAC;IACtD,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC;IACd,CAAC;IAED,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAEtD,OAAO,CACN,IAAI,IAAI,IAAI;QACZ,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACxD,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CACtC,CAAC;AAAA,CACF,CAAC"}
|
package/dist/resolvers.js
CHANGED
|
@@ -27,7 +27,7 @@ export const resolveFromService = async (host) => {
|
|
|
27
27
|
};
|
|
28
28
|
const getProtectedResourceMetadata = async (host) => {
|
|
29
29
|
const url = new URL(`/.well-known/oauth-protected-resource`, host);
|
|
30
|
-
const response = await fetch(url, {
|
|
30
|
+
const response = await fetch(url.href, {
|
|
31
31
|
redirect: 'manual',
|
|
32
32
|
headers: {
|
|
33
33
|
accept: 'application/json',
|
|
@@ -44,7 +44,7 @@ const getProtectedResourceMetadata = async (host) => {
|
|
|
44
44
|
};
|
|
45
45
|
const getAuthorizationServerMetadata = async (host) => {
|
|
46
46
|
const url = new URL(`/.well-known/oauth-authorization-server`, host);
|
|
47
|
-
const response = await fetch(url, {
|
|
47
|
+
const response = await fetch(url.href, {
|
|
48
48
|
redirect: 'manual',
|
|
49
49
|
headers: {
|
|
50
50
|
accept: 'application/json',
|
package/dist/resolvers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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CAAC;IACF,CAAC;IAED,OAAO,WAAW,CAAC;AAAA,CACnB,CAAC"}
|
package/lib/agents/user-agent.ts
CHANGED
|
@@ -56,7 +56,7 @@ export class OAuthUserAgent implements FetchHandlerObject {
|
|
|
56
56
|
|
|
57
57
|
headers.set('authorization', `${session.token.type} ${session.token.access}`);
|
|
58
58
|
|
|
59
|
-
let response = await this.#fetch(url, { ...init, headers });
|
|
59
|
+
let response = await this.#fetch(url.href, { ...init, headers });
|
|
60
60
|
if (!isInvalidTokenResponse(response)) {
|
|
61
61
|
return response;
|
|
62
62
|
}
|
|
@@ -79,7 +79,7 @@ export class OAuthUserAgent implements FetchHandlerObject {
|
|
|
79
79
|
url = new URL(pathname, session.info.aud);
|
|
80
80
|
headers.set('authorization', `${session.token.type} ${session.token.access}`);
|
|
81
81
|
|
|
82
|
-
return await this.#fetch(url, { ...init, headers });
|
|
82
|
+
return await this.#fetch(url.href, { ...init, headers });
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
package/lib/resolvers.ts
CHANGED
|
@@ -38,7 +38,7 @@ export const resolveFromService = async (
|
|
|
38
38
|
|
|
39
39
|
const getProtectedResourceMetadata = async (host: string): Promise<ProtectedResourceMetadata> => {
|
|
40
40
|
const url = new URL(`/.well-known/oauth-protected-resource`, host);
|
|
41
|
-
const response = await fetch(url, {
|
|
41
|
+
const response = await fetch(url.href, {
|
|
42
42
|
redirect: 'manual',
|
|
43
43
|
headers: {
|
|
44
44
|
accept: 'application/json',
|
|
@@ -59,7 +59,7 @@ const getProtectedResourceMetadata = async (host: string): Promise<ProtectedReso
|
|
|
59
59
|
|
|
60
60
|
const getAuthorizationServerMetadata = async (host: string): Promise<AuthorizationServerMetadata> => {
|
|
61
61
|
const url = new URL(`/.well-known/oauth-authorization-server`, host);
|
|
62
|
-
const response = await fetch(url, {
|
|
62
|
+
const response = await fetch(url.href, {
|
|
63
63
|
redirect: 'manual',
|
|
64
64
|
headers: {
|
|
65
65
|
accept: 'application/json',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@atcute/oauth-browser-client",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.3",
|
|
5
5
|
"description": "minimal OAuth browser client implementation for AT Protocol",
|
|
6
6
|
"license": "0BSD",
|
|
7
7
|
"repository": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"nanoid": "^5.1.6",
|
|
23
|
-
"@atcute/client": "^4.1.
|
|
24
|
-
"@atcute/multibase": "^1.1.6",
|
|
23
|
+
"@atcute/client": "^4.1.1",
|
|
25
24
|
"@atcute/identity-resolver": "^1.2.0",
|
|
26
25
|
"@atcute/lexicons": "^1.2.5",
|
|
27
|
-
"@atcute/uint8array": "^1.0.6"
|
|
26
|
+
"@atcute/uint8array": "^1.0.6",
|
|
27
|
+
"@atcute/multibase": "^1.1.6"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "tsgo --project tsconfig.build.json",
|