sst 3.1.22 → 3.1.23
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.
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { OauthBasicConfig } from "./oauth.js";
|
|
2
|
-
|
|
3
|
-
type Config = ({
|
|
4
|
-
mode: "oauth";
|
|
5
|
-
} & OauthBasicConfig) | ({
|
|
6
|
-
mode: "oidc";
|
|
7
|
-
} & OidcBasicConfig);
|
|
2
|
+
type Config = OauthBasicConfig;
|
|
8
3
|
export declare const GithubAdapter: (config: Config) => (routes: import("./adapter.js").AdapterRoute, ctx: import("./adapter.js").AdapterOptions<{
|
|
9
4
|
tokenset: import("openid-client").TokenSet;
|
|
10
5
|
client: import("openid-client").BaseClient;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Issuer } from "openid-client";
|
|
2
2
|
import { OauthAdapter } from "./oauth.js";
|
|
3
|
-
import { OidcAdapter } from "./oidc.js";
|
|
4
3
|
const issuer = new Issuer({
|
|
5
4
|
issuer: "https://github.com",
|
|
6
5
|
authorization_endpoint: "https://github.com/login/oauth/authorize",
|
|
@@ -9,15 +8,8 @@ const issuer = new Issuer({
|
|
|
9
8
|
export const GithubAdapter =
|
|
10
9
|
/* @__PURE__ */
|
|
11
10
|
(config) => {
|
|
12
|
-
|
|
13
|
-
return OauthAdapter({
|
|
14
|
-
issuer,
|
|
15
|
-
...config,
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
return OidcAdapter({
|
|
11
|
+
return OauthAdapter({
|
|
19
12
|
issuer,
|
|
20
|
-
scope: "openid email profile",
|
|
21
13
|
...config,
|
|
22
14
|
});
|
|
23
15
|
};
|
|
@@ -59,7 +59,7 @@ export const OauthAdapter =
|
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
// response_mode=form_post
|
|
62
|
-
routes.
|
|
62
|
+
routes.post("/callback", async (c) => {
|
|
63
63
|
const [callback, client] = getClient(c);
|
|
64
64
|
const form = await c.req.formData();
|
|
65
65
|
if (form.get("error")) {
|
package/dist/auth/handler.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "sst",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
-
"version": "3.1.
|
|
6
|
+
"version": "3.1.23",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./dist/index.js",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"sst-linux-x64": "3.1.
|
|
51
|
-
"sst-linux-x86": "3.1.
|
|
52
|
-
"sst-
|
|
53
|
-
"sst-
|
|
54
|
-
"sst-darwin-arm64": "3.1.
|
|
50
|
+
"sst-linux-x64": "3.1.23",
|
|
51
|
+
"sst-linux-x86": "3.1.23",
|
|
52
|
+
"sst-darwin-x64": "3.1.23",
|
|
53
|
+
"sst-linux-arm64": "3.1.23",
|
|
54
|
+
"sst-darwin-arm64": "3.1.23"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"aws4fetch": "^1.0.18",
|