@atproto/oauth-client 0.1.2-rc.2 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -8
- package/README.md +4 -2
- package/dist/oauth-atp-agent.d.ts +1 -1
- package/dist/oauth-atp-agent.d.ts.map +1 -1
- package/dist/oauth-atp-agent.js +1 -2
- package/dist/oauth-atp-agent.js.map +1 -1
- package/package.json +8 -8
- package/src/oauth-atp-agent.ts +2 -3
- package/dist/refresh-error.d.ts +0 -7
- package/dist/refresh-error.d.ts.map +0 -1
- package/dist/refresh-error.js +0 -16
- package/dist/refresh-error.js.map +0 -1
package/CHANGELOG.md
CHANGED
@@ -1,18 +1,21 @@
|
|
1
1
|
# @atproto/oauth-client
|
2
2
|
|
3
|
-
## 0.1.2
|
3
|
+
## 0.1.2
|
4
4
|
|
5
5
|
### Patch Changes
|
6
6
|
|
7
|
-
- Misc fixes for confidential client usage
|
7
|
+
- [#2483](https://github.com/bluesky-social/atproto/pull/2483) [`b934b396b`](https://github.com/bluesky-social/atproto/commit/b934b396b13ba32bf2bf7e75ecdf6871e5f310dd) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Misc fixes for confidential client usage
|
8
8
|
|
9
|
-
|
9
|
+
- [#2483](https://github.com/bluesky-social/atproto/pull/2483) [`b934b396b`](https://github.com/bluesky-social/atproto/commit/b934b396b13ba32bf2bf7e75ecdf6871e5f310dd) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Better implement aptroto OAuth spec
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
-
|
14
|
-
- @atproto/
|
15
|
-
- @atproto/
|
11
|
+
- Updated dependencies [[`b934b396b`](https://github.com/bluesky-social/atproto/commit/b934b396b13ba32bf2bf7e75ecdf6871e5f310dd), [`b934b396b`](https://github.com/bluesky-social/atproto/commit/b934b396b13ba32bf2bf7e75ecdf6871e5f310dd), [`b934b396b`](https://github.com/bluesky-social/atproto/commit/b934b396b13ba32bf2bf7e75ecdf6871e5f310dd), [`b934b396b`](https://github.com/bluesky-social/atproto/commit/b934b396b13ba32bf2bf7e75ecdf6871e5f310dd), [`b934b396b`](https://github.com/bluesky-social/atproto/commit/b934b396b13ba32bf2bf7e75ecdf6871e5f310dd), [`b934b396b`](https://github.com/bluesky-social/atproto/commit/b934b396b13ba32bf2bf7e75ecdf6871e5f310dd)]:
|
12
|
+
- @atproto/oauth-types@0.1.2
|
13
|
+
- @atproto-labs/handle-resolver@0.1.2
|
14
|
+
- @atproto/did@0.1.1
|
15
|
+
- @atproto/xrpc@0.6.0
|
16
|
+
- @atproto/api@0.13.0
|
17
|
+
- @atproto-labs/identity-resolver@0.1.2
|
18
|
+
- @atproto-labs/did-resolver@0.1.2
|
16
19
|
|
17
20
|
## 0.1.1
|
18
21
|
|
package/README.md
CHANGED
@@ -155,8 +155,10 @@ await agent.post({
|
|
155
155
|
text: 'Hello, world!',
|
156
156
|
})
|
157
157
|
|
158
|
-
|
159
|
-
|
158
|
+
if (agent instanceof AtpAgent) {
|
159
|
+
// revoke credentials on the server (causing sessionStore.del() to be called)
|
160
|
+
await agent.logout()
|
161
|
+
}
|
160
162
|
```
|
161
163
|
|
162
164
|
## Advances use-cases
|
@@ -3,7 +3,7 @@ import { OAuthAgent } from './oauth-agent.js';
|
|
3
3
|
export declare class OAuthAtpAgent extends Agent {
|
4
4
|
readonly oauthAgent: OAuthAgent;
|
5
5
|
constructor(oauthAgent: OAuthAgent);
|
6
|
-
clone():
|
6
|
+
clone(): OAuthAtpAgent;
|
7
7
|
get did(): string;
|
8
8
|
signOut(): Promise<void>;
|
9
9
|
refreshIfNeeded(): Promise<void>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-atp-agent.d.ts","sourceRoot":"","sources":["../src/oauth-atp-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAIpC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,qBAAa,aAAc,SAAQ,KAAK;IAC1B,QAAQ,CAAC,UAAU,EAAE,UAAU;gBAAtB,UAAU,EAAE,UAAU;IAyB3C,KAAK,IAAI,
|
1
|
+
{"version":3,"file":"oauth-atp-agent.d.ts","sourceRoot":"","sources":["../src/oauth-atp-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAIpC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,qBAAa,aAAc,SAAQ,KAAK;IAC1B,QAAQ,CAAC,UAAU,EAAE,UAAU;gBAAtB,UAAU,EAAE,UAAU;IAyB3C,KAAK,IAAI,aAAa;IAItB,IAAI,GAAG,IAAI,MAAM,CAEhB;IAEK,OAAO;IAIA,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;CAG9C"}
|
package/dist/oauth-atp-agent.js
CHANGED
@@ -35,8 +35,7 @@ class OAuthAtpAgent extends api_1.Agent {
|
|
35
35
|
});
|
36
36
|
}
|
37
37
|
clone() {
|
38
|
-
|
39
|
-
return this.copyInto(agent);
|
38
|
+
return this.copyInto(new OAuthAtpAgent(this.oauthAgent));
|
40
39
|
}
|
41
40
|
get did() {
|
42
41
|
return this.oauthAgent.sub;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"oauth-atp-agent.js","sourceRoot":"","sources":["../src/oauth-atp-agent.ts"],"names":[],"mappings":";;;AAAA,sCAAoC;AACpC,wCAAyC;AACzC,+CAAoE;AAIpE,MAAa,aAAc,SAAQ,WAAK;IACtC,YAAqB,UAAsB;QACzC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACxB,IAAI,CAAC;gBACH,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;YACjD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,KAAK,YAAY,kBAAU,EAAE,CAAC;oBAChC,MAAM,EAAE,UAAU,EAAE,OA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,CAAC;gBAED,IAAI,KAAK,YAAY,0BAAkB,EAAE,CAAC;oBACxC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAA;oBAC/C,MAAM,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;oBAC9D,MAAM,IAAI,gBAAS,CAAC,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE;wBAC3D,KAAK;qBACN,CAAC,CAAA;gBACJ,CAAC;gBAED,MAAM,KAAK,CAAA;YACb,CAAC;QACH,CAAC,CAAC,CAAA;QAtBQ;;;;mBAAS,UAAU;WAAY;IAuB3C,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAA;IAC1D,CAAC;IAED,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAA;IAC5B,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAA;IACjC,CAAC;IAEM,KAAK,CAAC,eAAe;QAC1B,MAAM,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,CAAA;IACzC,CAAC;CACF;AAzCD,sCAyCC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/oauth-client",
|
3
|
-
"version": "0.1.2
|
3
|
+
"version": "0.1.2",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "OAuth client for ATPROTO PDS. This package serves as common base for environment-specific implementations (NodeJS, Browser, React-Native).",
|
6
6
|
"keywords": [
|
@@ -27,17 +27,17 @@
|
|
27
27
|
"dependencies": {
|
28
28
|
"multiformats": "^9.9.0",
|
29
29
|
"zod": "^3.23.8",
|
30
|
-
"@atproto-labs/did-resolver": "0.1.2
|
30
|
+
"@atproto-labs/did-resolver": "0.1.2",
|
31
31
|
"@atproto-labs/fetch": "0.1.0",
|
32
|
-
"@atproto-labs/handle-resolver": "0.1.2
|
33
|
-
"@atproto-labs/identity-resolver": "0.1.2
|
32
|
+
"@atproto-labs/handle-resolver": "0.1.2",
|
33
|
+
"@atproto-labs/identity-resolver": "0.1.2",
|
34
34
|
"@atproto-labs/simple-store": "0.1.1",
|
35
35
|
"@atproto-labs/simple-store-memory": "0.1.1",
|
36
|
-
"@atproto/api": "0.13.0
|
37
|
-
"@atproto/did": "0.1.1
|
38
|
-
"@atproto/xrpc": "0.6.0-rc.0",
|
36
|
+
"@atproto/api": "0.13.0",
|
37
|
+
"@atproto/did": "0.1.1",
|
39
38
|
"@atproto/jwk": "0.1.1",
|
40
|
-
"@atproto/oauth-types": "0.1.2
|
39
|
+
"@atproto/oauth-types": "0.1.2",
|
40
|
+
"@atproto/xrpc": "0.6.0"
|
41
41
|
},
|
42
42
|
"devDependencies": {
|
43
43
|
"typescript": "^5.3.3"
|
package/src/oauth-atp-agent.ts
CHANGED
@@ -30,9 +30,8 @@ export class OAuthAtpAgent extends Agent {
|
|
30
30
|
})
|
31
31
|
}
|
32
32
|
|
33
|
-
clone():
|
34
|
-
|
35
|
-
return this.copyInto(agent)
|
33
|
+
clone(): OAuthAtpAgent {
|
34
|
+
return this.copyInto(new OAuthAtpAgent(this.oauthAgent))
|
36
35
|
}
|
37
36
|
|
38
37
|
get did(): string {
|
package/dist/refresh-error.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"refresh-error.d.ts","sourceRoot":"","sources":["../src/refresh-error.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAa,SAAQ,KAAK;aAEnB,GAAG,EAAE,MAAM;gBAAX,GAAG,EAAE,MAAM,EAC3B,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAIhC"}
|
package/dist/refresh-error.js
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.RefreshError = void 0;
|
4
|
-
class RefreshError extends Error {
|
5
|
-
constructor(sub, message, options) {
|
6
|
-
super(message, options);
|
7
|
-
Object.defineProperty(this, "sub", {
|
8
|
-
enumerable: true,
|
9
|
-
configurable: true,
|
10
|
-
writable: true,
|
11
|
-
value: sub
|
12
|
-
});
|
13
|
-
}
|
14
|
-
}
|
15
|
-
exports.RefreshError = RefreshError;
|
16
|
-
//# sourceMappingURL=refresh-error.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"refresh-error.js","sourceRoot":"","sources":["../src/refresh-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAa,SAAQ,KAAK;IACrC,YACkB,GAAW,EAC3B,OAAe,EACf,OAA6B;QAE7B,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAJvB;;;;mBAAgB,GAAG;WAAQ;IAK7B,CAAC;CACF;AARD,oCAQC"}
|