sst 3.0.6 → 3.0.8
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/dist/auth/adapter/index.d.ts +10 -0
- package/dist/auth/adapter/index.js +10 -0
- package/dist/auth/example/bun.js +1 -1
- package/dist/auth/handler.js +6 -4
- package/dist/auth/index.d.ts +0 -10
- package/dist/auth/index.js +0 -10
- package/dist/auth/session.js +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./oidc.js";
|
|
2
|
+
export * from "./google.js";
|
|
3
|
+
export * from "./link.js";
|
|
4
|
+
export * from "./github.js";
|
|
5
|
+
export * from "./facebook.js";
|
|
6
|
+
export * from "./microsoft.js";
|
|
7
|
+
export * from "./oauth.js";
|
|
8
|
+
export * from "./spotify.js";
|
|
9
|
+
export * from "./code.js";
|
|
10
|
+
export * from "./apple.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./oidc.js";
|
|
2
|
+
export * from "./google.js";
|
|
3
|
+
export * from "./link.js";
|
|
4
|
+
export * from "./github.js";
|
|
5
|
+
export * from "./facebook.js";
|
|
6
|
+
export * from "./microsoft.js";
|
|
7
|
+
export * from "./oauth.js";
|
|
8
|
+
export * from "./spotify.js";
|
|
9
|
+
export * from "./code.js";
|
|
10
|
+
export * from "./apple.js";
|
package/dist/auth/example/bun.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AuthHandler } from "../handler.js";
|
|
2
2
|
import { LinkAdapter } from "../adapter/link.js";
|
|
3
3
|
import { createSessionBuilder } from "../session.js";
|
|
4
|
-
import { CodeAdapter } from "../index.js";
|
|
4
|
+
import { CodeAdapter } from "../adapter/index.js";
|
|
5
5
|
const sessions = createSessionBuilder();
|
|
6
6
|
export default AuthHandler({
|
|
7
7
|
providers: {
|
package/dist/auth/handler.js
CHANGED
|
@@ -34,6 +34,8 @@ export class InvalidSessionError extends Error {
|
|
|
34
34
|
super("Invalid session");
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
+
import process from "node:process";
|
|
38
|
+
import { Resource } from "../resource.js";
|
|
37
39
|
export function AuthHandler(input) {
|
|
38
40
|
const app = new Hono();
|
|
39
41
|
if (!input.callbacks.auth.error) {
|
|
@@ -48,12 +50,12 @@ export function AuthHandler(input) {
|
|
|
48
50
|
}
|
|
49
51
|
const options = {
|
|
50
52
|
signing: {
|
|
51
|
-
privateKey: importPKCS8(process.env.AUTH_PRIVATE_KEY, "RS512"),
|
|
52
|
-
publicKey: importSPKI(process.env.AUTH_PUBLIC_KEY, "RS512"),
|
|
53
|
+
privateKey: importPKCS8(process.env.AUTH_PRIVATE_KEY || Resource.AUTH_PRIVATE_KEY, "RS512"),
|
|
54
|
+
publicKey: importSPKI(process.env.AUTH_PUBLIC_KEY || Resource.AUTH_PUBLIC_KEY, "RS512"),
|
|
53
55
|
},
|
|
54
56
|
encryption: {
|
|
55
|
-
privateKey: importPKCS8(process.env.AUTH_PRIVATE_KEY, "RSA-OAEP-512"),
|
|
56
|
-
publicKey: importSPKI(process.env.AUTH_PUBLIC_KEY, "RSA-OAEP-512"),
|
|
57
|
+
privateKey: importPKCS8(process.env.AUTH_PRIVATE_KEY || Resource.AUTH_PRIVATE_KEY, "RSA-OAEP-512"),
|
|
58
|
+
publicKey: importSPKI(process.env.AUTH_PUBLIC_KEY || Resource.AUTH_PUBLIC_KEY, "RSA-OAEP-512"),
|
|
57
59
|
},
|
|
58
60
|
algorithm: "RS512",
|
|
59
61
|
async success(ctx, properties) {
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
export * from "./adapter/oidc.js";
|
|
2
|
-
export * from "./adapter/google.js";
|
|
3
|
-
export * from "./adapter/link.js";
|
|
4
|
-
export * from "./adapter/github.js";
|
|
5
|
-
export * from "./adapter/facebook.js";
|
|
6
|
-
export * from "./adapter/microsoft.js";
|
|
7
|
-
export * from "./adapter/oauth.js";
|
|
8
|
-
export * from "./adapter/spotify.js";
|
|
9
|
-
export * from "./adapter/code.js";
|
|
10
|
-
export * from "./adapter/apple.js";
|
|
11
1
|
export type { Adapter } from "./adapter/adapter.js";
|
|
12
2
|
export * from "./session.js";
|
|
13
3
|
export * from "./handler.js";
|
package/dist/auth/index.js
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
export * from "./adapter/oidc.js";
|
|
2
|
-
export * from "./adapter/google.js";
|
|
3
|
-
export * from "./adapter/link.js";
|
|
4
|
-
export * from "./adapter/github.js";
|
|
5
|
-
export * from "./adapter/facebook.js";
|
|
6
|
-
export * from "./adapter/microsoft.js";
|
|
7
|
-
export * from "./adapter/oauth.js";
|
|
8
|
-
export * from "./adapter/spotify.js";
|
|
9
|
-
export * from "./adapter/code.js";
|
|
10
|
-
export * from "./adapter/apple.js";
|
|
11
1
|
export * from "./session.js";
|
|
12
2
|
export * from "./handler.js";
|
|
13
3
|
export { Issuer } from "openid-client";
|
package/dist/auth/session.js
CHANGED
|
@@ -12,7 +12,7 @@ export function createSessionBuilder() {
|
|
|
12
12
|
return result.payload;
|
|
13
13
|
},
|
|
14
14
|
async create(session) {
|
|
15
|
-
const privateKey = await importPKCS8(process.env.AUTH_PRIVATE_KEY, "RS512");
|
|
15
|
+
const privateKey = await importPKCS8(process.env.AUTH_PRIVATE_KEY || Resource.AUTH_PRIVATE_KEY, "RS512");
|
|
16
16
|
const token = await new SignJWT(session)
|
|
17
17
|
.setProtectedHeader({ alg: "RS512" })
|
|
18
18
|
.setExpirationTime("1yr")
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "sst",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
-
"version": "3.0.
|
|
6
|
+
"version": "3.0.8",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./dist/index.js",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@aws-sdk/client-lambda": "3.478.0",
|
|
25
|
-
"hono": "
|
|
26
|
-
"jose": "
|
|
27
|
-
"openid-client": "
|
|
25
|
+
"hono": "4.0.1",
|
|
26
|
+
"jose": "5.2.3",
|
|
27
|
+
"openid-client": "5.6.4"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "tsc",
|