@pexis/auth 0.0.0-stage → 0.1.1
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/LICENSE +23 -0
- package/README.md +31 -2
- package/dist/index.d.ts +52 -0
- package/dist/index.js +363 -0
- package/dist/index.js.map +1 -0
- package/dist/jwt.d.ts +62 -0
- package/dist/jwt.js +140 -0
- package/dist/jwt.js.map +1 -0
- package/dist/providers.d.ts +81 -0
- package/dist/providers.js +164 -0
- package/dist/providers.js.map +1 -0
- package/dist/server/client.d.ts +48 -0
- package/dist/server/client.js +208 -0
- package/dist/server/client.js.map +1 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.js +7 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/plugin.d.ts +37 -0
- package/dist/server/plugin.js +522 -0
- package/dist/server/plugin.js.map +1 -0
- package/dist/server/store.d.ts +81 -0
- package/dist/server/store.js +106 -0
- package/dist/server/store.js.map +1 -0
- package/package.json +38 -4
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/** A person allowed a client to act for them. */
|
|
2
|
+
export interface OAuthGrant {
|
|
3
|
+
id: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
/** The client's metadata URL. */
|
|
6
|
+
clientId: string;
|
|
7
|
+
/** What the client calls itself, as it said at consent. Untrusted text. */
|
|
8
|
+
clientName: string;
|
|
9
|
+
/** Where the code was sent, shown on the connected-apps page. */
|
|
10
|
+
redirectHost: string;
|
|
11
|
+
scopes: string[];
|
|
12
|
+
createdAt: number;
|
|
13
|
+
/** The grant ends then, however often it is refreshed. */
|
|
14
|
+
expiresAt: number;
|
|
15
|
+
lastUsedAt: number | null;
|
|
16
|
+
revokedAt: number | null;
|
|
17
|
+
}
|
|
18
|
+
/** What a code was issued for, checked again at the token endpoint. */
|
|
19
|
+
export interface CodeDetails {
|
|
20
|
+
redirectUri: string;
|
|
21
|
+
codeChallenge: string;
|
|
22
|
+
resource: string;
|
|
23
|
+
}
|
|
24
|
+
export type SecretKind = 'code' | 'access' | 'refresh';
|
|
25
|
+
export interface StoredSecret {
|
|
26
|
+
hash: string;
|
|
27
|
+
grantId: string;
|
|
28
|
+
kind: SecretKind;
|
|
29
|
+
/** It may be used until then. */
|
|
30
|
+
expiresAt: number;
|
|
31
|
+
usedAt: number | null;
|
|
32
|
+
/** For codes. */
|
|
33
|
+
details?: CodeDetails;
|
|
34
|
+
}
|
|
35
|
+
/** The result of using a code or refresh token. */
|
|
36
|
+
export type Use = {
|
|
37
|
+
ok: true;
|
|
38
|
+
secret: StoredSecret;
|
|
39
|
+
} | {
|
|
40
|
+
ok: false;
|
|
41
|
+
reason: 'unknown' | 'expired';
|
|
42
|
+
} | {
|
|
43
|
+
ok: false;
|
|
44
|
+
reason: 'reused';
|
|
45
|
+
grantId: string;
|
|
46
|
+
};
|
|
47
|
+
export interface OAuthStore {
|
|
48
|
+
/** A new grant and its code, at consent. */
|
|
49
|
+
createGrant(grant: OAuthGrant, code: StoredSecret): Promise<void>;
|
|
50
|
+
getGrant(id: string): Promise<OAuthGrant | undefined>;
|
|
51
|
+
/** Uses a code or refresh token once. Atomic: of two callers, one gets ok. */
|
|
52
|
+
use(hash: string, kind: 'code' | 'refresh', now: number): Promise<Use>;
|
|
53
|
+
/** Marks a code as used without issuing anything, after a wrong code_verifier. */
|
|
54
|
+
burn(hash: string, now: number): Promise<void>;
|
|
55
|
+
/** New access and refresh tokens for a grant. */
|
|
56
|
+
issue(secrets: StoredSecret[]): Promise<void>;
|
|
57
|
+
/** Any code or token by hash, used or not, for revocation. */
|
|
58
|
+
lookup(hash: string): Promise<StoredSecret | undefined>;
|
|
59
|
+
/** An access token, if it exists and has not expired; its grant must still be checked. */
|
|
60
|
+
access(hash: string, now: number): Promise<StoredSecret | undefined>;
|
|
61
|
+
/** Ends a grant and deletes its tokens. Codes stay, so a reused code is still recognized. */
|
|
62
|
+
revoke(grantId: string, now: number): Promise<void>;
|
|
63
|
+
/** Records when the grant was last used, at most once a minute. */
|
|
64
|
+
touch(grantId: string, now: number): Promise<void>;
|
|
65
|
+
/** A person's live grants, newest first, for the connected-apps page. */
|
|
66
|
+
grantsOf(userId: string, now: number): Promise<OAuthGrant[]>;
|
|
67
|
+
/** Live grants, newest first, for the admin. */
|
|
68
|
+
recent(limit: number, now: number): Promise<OAuthGrant[]>;
|
|
69
|
+
}
|
|
70
|
+
/** The secret a client holds, as stored: hex SHA-256. */
|
|
71
|
+
export declare function hashSecret(secret: string): Promise<string>;
|
|
72
|
+
/** 256 random bits, base64url. */
|
|
73
|
+
export declare function newSecret(): string;
|
|
74
|
+
/**
|
|
75
|
+
* Keeps grants in memory: for development and single-server sites. Single
|
|
76
|
+
* use is per process, so with several servers use oauthStore(db) from
|
|
77
|
+
* @pexis/data.
|
|
78
|
+
*/
|
|
79
|
+
export declare function memoryOAuthStore(options?: {
|
|
80
|
+
maxGrants?: number;
|
|
81
|
+
}): OAuthStore;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// Storage for the OAuth server: grants (a person allowed a client), and the
|
|
2
|
+
// codes and tokens issued under them, kept only as SHA-256 hashes.
|
|
3
|
+
//
|
|
4
|
+
// Two operations must be atomic even with several servers on one database:
|
|
5
|
+
// using a code, and using a refresh token. Each succeeds for exactly one
|
|
6
|
+
// caller; every other caller learns it was already used, which means the
|
|
7
|
+
// secret was copied, so the grant is revoked.
|
|
8
|
+
/** The secret a client holds, as stored: hex SHA-256. */
|
|
9
|
+
export async function hashSecret(secret) {
|
|
10
|
+
const digest = new Uint8Array(await crypto.subtle.digest('SHA-256', new TextEncoder().encode(secret)));
|
|
11
|
+
return Array.from(digest, (b) => b.toString(16).padStart(2, '0')).join('');
|
|
12
|
+
}
|
|
13
|
+
/** 256 random bits, base64url. */
|
|
14
|
+
export function newSecret() {
|
|
15
|
+
const bytes = crypto.getRandomValues(new Uint8Array(32));
|
|
16
|
+
return btoa(String.fromCharCode(...bytes)).replaceAll('+', '-').replaceAll('/', '_').replace(/=+$/, '');
|
|
17
|
+
}
|
|
18
|
+
const live = (g, now) => g.revokedAt === null && g.expiresAt > now;
|
|
19
|
+
/**
|
|
20
|
+
* Keeps grants in memory: for development and single-server sites. Single
|
|
21
|
+
* use is per process, so with several servers use oauthStore(db) from
|
|
22
|
+
* @pexis/data.
|
|
23
|
+
*/
|
|
24
|
+
export function memoryOAuthStore(options = {}) {
|
|
25
|
+
const maxGrants = options.maxGrants ?? 10_000;
|
|
26
|
+
const grants = new Map();
|
|
27
|
+
const secrets = new Map();
|
|
28
|
+
const sweep = (now) => {
|
|
29
|
+
for (const [id, g] of grants) {
|
|
30
|
+
if (g.expiresAt <= now || (g.revokedAt !== null && now - g.revokedAt > g.expiresAt - g.createdAt)) {
|
|
31
|
+
grants.delete(id);
|
|
32
|
+
for (const [hash, s] of secrets)
|
|
33
|
+
if (s.grantId === id)
|
|
34
|
+
secrets.delete(hash);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
// Oldest first, when full.
|
|
38
|
+
while (grants.size > maxGrants) {
|
|
39
|
+
const [oldest] = grants.keys();
|
|
40
|
+
grants.delete(oldest);
|
|
41
|
+
for (const [hash, s] of secrets)
|
|
42
|
+
if (s.grantId === oldest)
|
|
43
|
+
secrets.delete(hash);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
return {
|
|
47
|
+
async createGrant(grant, code) {
|
|
48
|
+
sweep(grant.createdAt);
|
|
49
|
+
grants.set(grant.id, { ...grant, scopes: [...grant.scopes] });
|
|
50
|
+
secrets.set(code.hash, { ...code });
|
|
51
|
+
},
|
|
52
|
+
async getGrant(id) {
|
|
53
|
+
const g = grants.get(id);
|
|
54
|
+
return g ? { ...g, scopes: [...g.scopes] } : undefined;
|
|
55
|
+
},
|
|
56
|
+
async use(hash, kind, now) {
|
|
57
|
+
const s = secrets.get(hash);
|
|
58
|
+
if (!s || s.kind !== kind)
|
|
59
|
+
return { ok: false, reason: 'unknown' };
|
|
60
|
+
// No await between the check and the write, so this is atomic in one process.
|
|
61
|
+
if (s.usedAt !== null)
|
|
62
|
+
return { ok: false, reason: 'reused', grantId: s.grantId };
|
|
63
|
+
if (s.expiresAt <= now)
|
|
64
|
+
return { ok: false, reason: 'expired' };
|
|
65
|
+
s.usedAt = now;
|
|
66
|
+
return { ok: true, secret: { ...s } };
|
|
67
|
+
},
|
|
68
|
+
async burn(hash, now) {
|
|
69
|
+
const s = secrets.get(hash);
|
|
70
|
+
if (s && s.usedAt === null)
|
|
71
|
+
s.usedAt = now;
|
|
72
|
+
},
|
|
73
|
+
async issue(list) {
|
|
74
|
+
for (const s of list)
|
|
75
|
+
secrets.set(s.hash, { ...s });
|
|
76
|
+
},
|
|
77
|
+
async lookup(hash) {
|
|
78
|
+
const s = secrets.get(hash);
|
|
79
|
+
return s ? { ...s } : undefined;
|
|
80
|
+
},
|
|
81
|
+
async access(hash, now) {
|
|
82
|
+
const s = secrets.get(hash);
|
|
83
|
+
return s && s.kind === 'access' && s.expiresAt > now ? { ...s } : undefined;
|
|
84
|
+
},
|
|
85
|
+
async revoke(grantId, now) {
|
|
86
|
+
const g = grants.get(grantId);
|
|
87
|
+
if (g && g.revokedAt === null)
|
|
88
|
+
g.revokedAt = now;
|
|
89
|
+
for (const [hash, s] of secrets)
|
|
90
|
+
if (s.grantId === grantId && s.kind !== 'code')
|
|
91
|
+
secrets.delete(hash);
|
|
92
|
+
},
|
|
93
|
+
async touch(grantId, now) {
|
|
94
|
+
const g = grants.get(grantId);
|
|
95
|
+
if (g && (g.lastUsedAt === null || now - g.lastUsedAt >= 60_000))
|
|
96
|
+
g.lastUsedAt = now;
|
|
97
|
+
},
|
|
98
|
+
async grantsOf(userId, now) {
|
|
99
|
+
return [...grants.values()].filter((g) => g.userId === userId && live(g, now)).sort((a, b) => b.createdAt - a.createdAt).map((g) => ({ ...g, scopes: [...g.scopes] }));
|
|
100
|
+
},
|
|
101
|
+
async recent(limit, now) {
|
|
102
|
+
return [...grants.values()].filter((g) => live(g, now)).sort((a, b) => b.createdAt - a.createdAt).slice(0, limit).map((g) => ({ ...g, scopes: [...g.scopes] }));
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/server/store.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,mEAAmE;AACnE,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,yEAAyE;AACzE,8CAA8C;AAmE9C,yDAAyD;AACzD,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAc;IAC7C,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACvG,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,kCAAkC;AAClC,MAAM,UAAU,SAAS;IACvB,MAAM,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IACzD,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAC1G,CAAC;AAED,MAAM,IAAI,GAAG,CAAC,CAAa,EAAE,GAAW,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,IAAI,IAAI,CAAC,CAAC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,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAClK,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pexis/auth",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Pexis plugin: sign in with Google, Microsoft, GitHub, Apple or any OpenID Connect provider.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://github.com/pexis-dev/pexis/tree/main/packages/auth#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/pexis-dev/pexis.git",
|
|
10
|
+
"directory": "packages/auth"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/pexis-dev/pexis/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./server": {
|
|
22
|
+
"types": "./dist/server/index.d.ts",
|
|
23
|
+
"default": "./dist/server/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=24"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public",
|
|
34
|
+
"provenance": true
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@pexis/core": "0.1.1",
|
|
38
|
+
"@pexis/sessions": "0.1.1"
|
|
39
|
+
}
|
|
40
|
+
}
|