@atproto/oauth-provider 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +45 -0
- package/dist/account/account-store.d.ts +2 -2
- package/dist/assets/app/bundle-manifest.json +3 -3
- package/dist/assets/app/main.css +1 -1
- package/dist/assets/app/main.js +3 -3
- package/dist/assets/app/main.js.map +1 -1
- package/dist/assets/assets-middleware.d.ts.map +1 -1
- package/dist/assets/assets-middleware.js +4 -2
- package/dist/assets/assets-middleware.js.map +1 -1
- package/dist/client/client-manager.d.ts.map +1 -1
- package/dist/client/client-manager.js +127 -118
- package/dist/client/client-manager.js.map +1 -1
- package/dist/client/client-utils.d.ts +1 -2
- package/dist/client/client-utils.d.ts.map +1 -1
- package/dist/client/client-utils.js +3 -12
- package/dist/client/client-utils.js.map +1 -1
- package/dist/client/client.d.ts +8 -3
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +70 -1
- package/dist/client/client.js.map +1 -1
- package/dist/constants.d.ts +0 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -2
- package/dist/constants.js.map +1 -1
- package/dist/errors/access-denied-error.d.ts +4 -4
- package/dist/errors/access-denied-error.d.ts.map +1 -1
- package/dist/errors/access-denied-error.js +2 -2
- package/dist/errors/access-denied-error.js.map +1 -1
- package/dist/errors/account-selection-required-error.d.ts +2 -2
- package/dist/errors/account-selection-required-error.d.ts.map +1 -1
- package/dist/errors/account-selection-required-error.js.map +1 -1
- package/dist/errors/consent-required-error.d.ts +2 -2
- package/dist/errors/consent-required-error.d.ts.map +1 -1
- package/dist/errors/consent-required-error.js.map +1 -1
- package/dist/errors/invalid-authorization-details-error.d.ts +2 -2
- package/dist/errors/invalid-authorization-details-error.d.ts.map +1 -1
- package/dist/errors/invalid-authorization-details-error.js.map +1 -1
- package/dist/errors/invalid-client-id-error.d.ts +1 -1
- package/dist/errors/invalid-client-id-error.d.ts.map +1 -1
- package/dist/errors/invalid-client-id-error.js +12 -6
- package/dist/errors/invalid-client-id-error.js.map +1 -1
- package/dist/errors/invalid-client-metadata-error.d.ts +1 -1
- package/dist/errors/invalid-client-metadata-error.d.ts.map +1 -1
- package/dist/errors/invalid-client-metadata-error.js +11 -3
- package/dist/errors/invalid-client-metadata-error.js.map +1 -1
- package/dist/errors/invalid-parameters-error.d.ts +2 -2
- package/dist/errors/invalid-parameters-error.d.ts.map +1 -1
- package/dist/errors/invalid-parameters-error.js.map +1 -1
- package/dist/errors/invalid-scope-error.d.ts +9 -0
- package/dist/errors/invalid-scope-error.d.ts.map +1 -0
- package/dist/errors/invalid-scope-error.js +14 -0
- package/dist/errors/invalid-scope-error.js.map +1 -0
- package/dist/errors/login-required-error.d.ts +2 -2
- package/dist/errors/login-required-error.d.ts.map +1 -1
- package/dist/errors/login-required-error.js.map +1 -1
- package/dist/lib/html/html.d.ts +1 -1
- package/dist/lib/html/html.d.ts.map +1 -1
- package/dist/lib/html/html.js +14 -11
- package/dist/lib/html/html.js.map +1 -1
- package/dist/lib/http/parser.d.ts +9 -2
- package/dist/lib/http/parser.d.ts.map +1 -1
- package/dist/lib/http/parser.js +15 -7
- package/dist/lib/http/parser.js.map +1 -1
- package/dist/lib/http/request.d.ts +0 -23
- package/dist/lib/http/request.d.ts.map +1 -1
- package/dist/lib/http/request.js +1 -11
- package/dist/lib/http/request.js.map +1 -1
- package/dist/lib/http/stream.d.ts +28 -6
- package/dist/lib/http/stream.d.ts.map +1 -1
- package/dist/lib/http/stream.js +21 -32
- package/dist/lib/http/stream.js.map +1 -1
- package/dist/lib/util/authorization-header.d.ts.map +1 -1
- package/dist/lib/util/authorization-header.js +1 -1
- package/dist/lib/util/authorization-header.js.map +1 -1
- package/dist/lib/util/hostname.d.ts +3 -2
- package/dist/lib/util/hostname.d.ts.map +1 -1
- package/dist/lib/util/hostname.js +12 -8
- package/dist/lib/util/hostname.js.map +1 -1
- package/dist/metadata/build-metadata.d.ts.map +1 -1
- package/dist/metadata/build-metadata.js +2 -1
- package/dist/metadata/build-metadata.js.map +1 -1
- package/dist/oauth-errors.d.ts +1 -0
- package/dist/oauth-errors.d.ts.map +1 -1
- package/dist/oauth-errors.js +3 -1
- package/dist/oauth-errors.js.map +1 -1
- package/dist/oauth-hooks.d.ts +3 -3
- package/dist/oauth-hooks.d.ts.map +1 -1
- package/dist/oauth-provider.d.ts +20 -22
- package/dist/oauth-provider.d.ts.map +1 -1
- package/dist/oauth-provider.js +234 -176
- package/dist/oauth-provider.js.map +1 -1
- package/dist/oauth-verifier.d.ts +2 -2
- package/dist/oauth-verifier.d.ts.map +1 -1
- package/dist/oauth-verifier.js.map +1 -1
- package/dist/output/build-authorize-data.d.ts +2 -2
- package/dist/output/build-authorize-data.d.ts.map +1 -1
- package/dist/output/send-authorize-redirect.d.ts +2 -4
- package/dist/output/send-authorize-redirect.d.ts.map +1 -1
- package/dist/output/send-authorize-redirect.js +5 -2
- package/dist/output/send-authorize-redirect.js.map +1 -1
- package/dist/request/request-data.d.ts +2 -2
- package/dist/request/request-data.d.ts.map +1 -1
- package/dist/request/request-info.d.ts +2 -2
- package/dist/request/request-info.d.ts.map +1 -1
- package/dist/request/request-manager.d.ts +4 -4
- package/dist/request/request-manager.d.ts.map +1 -1
- package/dist/request/request-manager.js +94 -60
- package/dist/request/request-manager.js.map +1 -1
- package/dist/signer/signed-token-payload.d.ts +122 -122
- package/dist/signer/signer.d.ts +41 -40
- package/dist/signer/signer.d.ts.map +1 -1
- package/dist/signer/signer.js +13 -15
- package/dist/signer/signer.js.map +1 -1
- package/dist/token/token-claims.d.ts +121 -121
- package/dist/token/token-data.d.ts +3 -3
- package/dist/token/token-data.d.ts.map +1 -1
- package/dist/token/token-manager.d.ts +4 -5
- package/dist/token/token-manager.d.ts.map +1 -1
- package/dist/token/token-manager.js +96 -72
- package/dist/token/token-manager.js.map +1 -1
- package/dist/token/verify-token-claims.d.ts +3 -3
- package/dist/token/verify-token-claims.d.ts.map +1 -1
- package/dist/token/verify-token-claims.js.map +1 -1
- package/package.json +5 -4
- package/src/assets/app/components/accept-form.tsx +6 -2
- package/src/assets/app/components/client-name.tsx +10 -11
- package/src/assets/app/components/sign-in-form.tsx +31 -2
- package/src/assets/assets-middleware.ts +4 -2
- package/src/client/client-manager.ts +163 -161
- package/src/client/client-utils.ts +7 -12
- package/src/client/client.ts +112 -3
- package/src/constants.ts +0 -2
- package/src/errors/access-denied-error.ts +10 -4
- package/src/errors/account-selection-required-error.ts +2 -2
- package/src/errors/consent-required-error.ts +2 -2
- package/src/errors/invalid-authorization-details-error.ts +2 -2
- package/src/errors/invalid-client-id-error.ts +15 -4
- package/src/errors/invalid-client-metadata-error.ts +15 -3
- package/src/errors/invalid-parameters-error.ts +2 -2
- package/src/errors/invalid-scope-error.ts +15 -0
- package/src/errors/login-required-error.ts +2 -2
- package/src/lib/html/html.ts +14 -12
- package/src/lib/http/parser.ts +21 -8
- package/src/lib/http/request.ts +1 -23
- package/src/lib/http/stream.ts +29 -60
- package/src/lib/util/authorization-header.ts +5 -2
- package/src/lib/util/hostname.ts +9 -5
- package/src/metadata/build-metadata.ts +3 -1
- package/src/oauth-errors.ts +1 -0
- package/src/oauth-hooks.ts +3 -3
- package/src/oauth-provider.ts +368 -269
- package/src/oauth-verifier.ts +2 -2
- package/src/output/build-authorize-data.ts +2 -2
- package/src/output/send-authorize-redirect.ts +7 -6
- package/src/request/request-data.ts +2 -2
- package/src/request/request-info.ts +2 -2
- package/src/request/request-manager.ts +129 -103
- package/src/signer/signer.ts +24 -25
- package/src/token/token-data.ts +3 -3
- package/src/token/token-manager.ts +141 -99
- package/src/token/verify-token-claims.ts +3 -3
- package/dist/request/types.d.ts +0 -328
- package/dist/request/types.d.ts.map +0 -1
- package/dist/request/types.js +0 -27
- package/dist/request/types.js.map +0 -1
- package/dist/token/types.d.ts +0 -250
- package/dist/token/types.d.ts.map +0 -1
- package/dist/token/types.js +0 -36
- package/dist/token/types.js.map +0 -1
- package/src/request/types.ts +0 -48
- package/src/token/types.ts +0 -86
@@ -1 +1 @@
|
|
1
|
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,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;SACpE,CAAA;QAED,MAAM,MAAM,GAAG,IAAA,0CAAiB,EAC9B,KAAK,EACL,KAAK,EACL,SAAS,EACT,OAAO,EACP,MAAM,EACN,aAAa,CACd,CAAA;QAED,OAAO,EAAE,GAAG,MAAM,EAAE,SAAS,EAAE,CAAA;IACjC,CAAC;CACF;AA3hBD,oCA2hBC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { OAuthAccessToken, OAuthTokenType } from '@atproto/oauth-types';
|
2
2
|
import { TokenClaims } from './token-claims.js';
|
3
3
|
import { TokenId } from './token-id.js';
|
4
4
|
export type VerifyTokenClaimsOptions = {
|
@@ -8,10 +8,10 @@ export type VerifyTokenClaimsOptions = {
|
|
8
8
|
scope?: [string, ...string[]];
|
9
9
|
};
|
10
10
|
export type VerifyTokenClaimsResult = {
|
11
|
-
token:
|
11
|
+
token: OAuthAccessToken;
|
12
12
|
tokenId: TokenId;
|
13
13
|
tokenType: OAuthTokenType;
|
14
14
|
claims: TokenClaims;
|
15
15
|
};
|
16
|
-
export declare function verifyTokenClaims(token:
|
16
|
+
export declare function verifyTokenClaims(token: OAuthAccessToken, tokenId: TokenId, tokenType: OAuthTokenType, dpopJkt: string | null, claims: TokenClaims, options?: VerifyTokenClaimsOptions): VerifyTokenClaimsResult;
|
17
17
|
//# sourceMappingURL=verify-token-claims.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"verify-token-claims.d.ts","sourceRoot":"","sources":["../../src/token/verify-token-claims.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"verify-token-claims.d.ts","sourceRoot":"","sources":["../../src/token/verify-token-claims.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAMvE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,MAAM,MAAM,wBAAwB,GAAG;IACrC,sEAAsE;IACtE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;IAChC,gEAAgE;IAChE,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,gBAAgB,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,cAAc,CAAA;IACzB,MAAM,EAAE,WAAW,CAAA;CACpB,CAAA;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,cAAc,EACzB,OAAO,EAAE,MAAM,GAAG,IAAI,EACtB,MAAM,EAAE,WAAW,EACnB,OAAO,CAAC,EAAE,wBAAwB,GACjC,uBAAuB,CAkCzB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"verify-token-claims.js","sourceRoot":"","sources":["../../src/token/verify-token-claims.ts"],"names":[],"mappings":";;;AAEA,mGAAwF;AACxF,uFAA6E;AAC7E,iDAA6C;AAC7C,wDAAsD;AAkBtD,SAAgB,iBAAiB,CAC/B,
|
1
|
+
{"version":3,"file":"verify-token-claims.js","sourceRoot":"","sources":["../../src/token/verify-token-claims.ts"],"names":[],"mappings":";;;AAEA,mGAAwF;AACxF,uFAA6E;AAC7E,iDAA6C;AAC7C,wDAAsD;AAkBtD,SAAgB,iBAAiB,CAC/B,KAAuB,EACvB,OAAgB,EAChB,SAAyB,EACzB,OAAsB,EACtB,MAAmB,EACnB,OAAkC;IAElC,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;IAChC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,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AI,IAAI,aAAa,EAAE,CAAC;QACrD,MAAM,IAAI,mCAAiB,CAAC,SAAS,EAAE,eAAe,CAAC,CAAA;IACzD,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,CAAA;AAC9C,CAAC;AAzCD,8CAyCC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atproto/oauth-provider",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.3",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "Generic OAuth2 and OpenID Connect provider for Node.js. Currently only supports features needed for Atproto.",
|
6
6
|
"keywords": [
|
@@ -38,14 +38,15 @@
|
|
38
38
|
"keygrip": "^1.1.0",
|
39
39
|
"psl": "^1.9.0",
|
40
40
|
"zod": "^3.23.8",
|
41
|
-
"@atproto-labs/fetch": "0.1.
|
42
|
-
"@atproto-labs/fetch-node": "0.1.
|
41
|
+
"@atproto-labs/fetch": "0.1.1",
|
42
|
+
"@atproto-labs/fetch-node": "0.1.1",
|
43
43
|
"@atproto-labs/pipe": "0.1.0",
|
44
44
|
"@atproto-labs/simple-store": "0.1.1",
|
45
45
|
"@atproto-labs/simple-store-memory": "0.1.1",
|
46
|
+
"@atproto/common": "^0.4.4",
|
46
47
|
"@atproto/jwk": "0.1.1",
|
47
48
|
"@atproto/jwk-jose": "0.1.2",
|
48
|
-
"@atproto/oauth-types": "0.1.
|
49
|
+
"@atproto/oauth-types": "0.1.5"
|
49
50
|
},
|
50
51
|
"devDependencies": {
|
51
52
|
"@rollup/plugin-commonjs": "^25.0.7",
|
@@ -77,8 +77,12 @@ export function AcceptForm({
|
|
77
77
|
</div>
|
78
78
|
)}
|
79
79
|
<p>
|
80
|
-
<ClientName
|
81
|
-
|
80
|
+
<ClientName
|
81
|
+
clientId={clientId}
|
82
|
+
clientMetadata={clientMetadata}
|
83
|
+
clientTrusted={clientTrusted}
|
84
|
+
/>{' '}
|
85
|
+
is asking for permission to access your account (
|
82
86
|
<AccountIdentifier account={account} />
|
83
87
|
).
|
84
88
|
</p>
|
@@ -10,29 +10,28 @@ import { UrlViewer } from './url-viewer'
|
|
10
10
|
export type ClientNameProps = {
|
11
11
|
clientId: string
|
12
12
|
clientMetadata: OAuthClientMetadata
|
13
|
+
clientTrusted: boolean
|
14
|
+
loopbackClientName?: string
|
13
15
|
} & HTMLAttributes<Element>
|
14
16
|
|
15
17
|
export function ClientName({
|
16
18
|
clientId,
|
17
19
|
clientMetadata,
|
20
|
+
clientTrusted,
|
21
|
+
loopbackClientName = 'An application on your device',
|
18
22
|
...attrs
|
19
23
|
}: ClientNameProps) {
|
24
|
+
if (clientTrusted && clientMetadata.client_name) {
|
25
|
+
return <span {...attrs}>{clientMetadata.client_name}</span>
|
26
|
+
}
|
27
|
+
|
20
28
|
if (isOAuthClientIdLoopback(clientId)) {
|
21
|
-
return <span {...attrs}>
|
29
|
+
return <span {...attrs}>{loopbackClientName}</span>
|
22
30
|
}
|
23
31
|
|
24
32
|
if (isOAuthClientIdDiscoverable(clientId)) {
|
25
|
-
if (clientMetadata.client_name) {
|
26
|
-
return (
|
27
|
-
<span {...attrs}>
|
28
|
-
{clientMetadata.client_name} (
|
29
|
-
<UrlViewer url={clientId} path />)
|
30
|
-
</span>
|
31
|
-
)
|
32
|
-
}
|
33
|
-
|
34
33
|
return <UrlViewer {...attrs} url={clientId} path />
|
35
34
|
}
|
36
35
|
|
37
|
-
return <span {...attrs}>{
|
36
|
+
return <span {...attrs}>{clientId}</span>
|
38
37
|
}
|
@@ -58,6 +58,7 @@ export type SignInFormProps = Override<
|
|
58
58
|
secondFactorPattern?: string
|
59
59
|
secondFactorFormat?: string
|
60
60
|
secondFactorHint?: string
|
61
|
+
secondFactorParseValue?: (value: string) => string | false
|
61
62
|
|
62
63
|
rememberVisible?: boolean
|
63
64
|
rememberDefault?: boolean
|
@@ -105,9 +106,10 @@ export function SignInForm({
|
|
105
106
|
secondFactorLabel = 'Confirmation code',
|
106
107
|
secondFactorAria = secondFactorLabel,
|
107
108
|
secondFactorPlaceholder = secondFactorLabel,
|
108
|
-
secondFactorPattern = '^[A-
|
109
|
+
secondFactorPattern = '^[A-Z2-7]{5}-[A-Z2-7]{5}$',
|
109
110
|
secondFactorFormat = 'XXXXX-XXXXX',
|
110
111
|
secondFactorHint = 'Check your $1 email for a login code and enter it here.',
|
112
|
+
secondFactorParseValue = checkAndFormatEmailOtpCode,
|
111
113
|
|
112
114
|
rememberVisible = true,
|
113
115
|
rememberDefault = false,
|
@@ -155,7 +157,15 @@ export function SignInForm({
|
|
155
157
|
if (secondFactor) {
|
156
158
|
const element = event.currentTarget.secondFactor
|
157
159
|
if (!element) throw new Error('Second factor input not found')
|
158
|
-
|
160
|
+
const value = secondFactorParseValue(element.value)
|
161
|
+
if (!value) {
|
162
|
+
setSecondFactor({
|
163
|
+
type: secondFactor.type,
|
164
|
+
hint: `Make sure to match the format: ${secondFactorFormat}`,
|
165
|
+
})
|
166
|
+
return
|
167
|
+
}
|
168
|
+
credentials[secondFactor.type] = value
|
159
169
|
}
|
160
170
|
|
161
171
|
setLoading(true)
|
@@ -306,3 +316,22 @@ function parseErrorMessage(err: unknown): string {
|
|
306
316
|
|
307
317
|
return 'An unknown error occurred'
|
308
318
|
}
|
319
|
+
|
320
|
+
export function checkAndFormatEmailOtpCode(code: string): string | false {
|
321
|
+
const EMAIL_CODE_REGEX = /^[A-Z2-7]{5}-[A-Z2-7]{5}$/
|
322
|
+
|
323
|
+
// Trim the reset code
|
324
|
+
let fixed = code.trim().toUpperCase()
|
325
|
+
|
326
|
+
// Add a dash if needed
|
327
|
+
if (fixed.length === 10) {
|
328
|
+
fixed = `${fixed.slice(0, 5)}-${fixed.slice(5, 10)}`
|
329
|
+
}
|
330
|
+
|
331
|
+
// Check that it is a valid format
|
332
|
+
if (!EMAIL_CODE_REGEX.test(fixed)) {
|
333
|
+
return false
|
334
|
+
}
|
335
|
+
|
336
|
+
return fixed
|
337
|
+
}
|
@@ -23,8 +23,10 @@ export function authorizeAssetsMiddleware(): Middleware {
|
|
23
23
|
if (!asset) return next()
|
24
24
|
|
25
25
|
try {
|
26
|
-
|
27
|
-
|
26
|
+
// Allow "null" (ie. no header) to allow loading assets outside of a
|
27
|
+
// fetch context (not from a web page).
|
28
|
+
validateFetchSite(req, res, [null, 'same-origin'])
|
29
|
+
validateFetchDest(req, res, [null, 'style', 'script'])
|
28
30
|
} catch (err) {
|
29
31
|
return next(err)
|
30
32
|
}
|