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
- import { OidcBasicConfig } from "./oidc.js";
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
- if (config.mode === "oauth") {
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.get("/callback", async (c) => {
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")) {
@@ -202,6 +202,5 @@ export function AuthHandler(input) {
202
202
  app.all("/*", async (c) => {
203
203
  return c.notFound();
204
204
  });
205
- console.log(app.routes);
206
205
  return app;
207
206
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "sst",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
- "version": "3.1.22",
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.22",
51
- "sst-linux-x86": "3.1.22",
52
- "sst-linux-arm64": "3.1.22",
53
- "sst-darwin-x64": "3.1.22",
54
- "sst-darwin-arm64": "3.1.22"
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",