sst 2.26.7 → 2.26.9
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/cli/commands/dev.js +0 -1
- package/config.js +0 -1
- package/node/future/auth/handler.d.ts +5 -5
- package/node/future/auth/handler.js +0 -32
- package/package.json +1 -1
package/cli/commands/dev.js
CHANGED
|
@@ -314,7 +314,6 @@ export const dev = (program) => program.command(["dev", "start"], "Work on your
|
|
|
314
314
|
await exit();
|
|
315
315
|
});
|
|
316
316
|
});
|
|
317
|
-
console.log("wtf");
|
|
318
317
|
Logger.debug("dev is ready");
|
|
319
318
|
const appMetadata = lazy(() => import("../../stacks/app-metadata.js").then((mod) => mod.useAppMetadata()));
|
|
320
319
|
clear();
|
package/config.js
CHANGED
|
@@ -43,15 +43,15 @@ export declare function AuthHandler<Providers extends Record<string, Adapter<any
|
|
|
43
43
|
}[keyof Providers]>(input: {
|
|
44
44
|
providers: Providers;
|
|
45
45
|
sessions?: Sessions;
|
|
46
|
-
/** @deprecated use
|
|
46
|
+
/** @deprecated use callbacks.auth.allowClient callback instead */
|
|
47
47
|
clients?: () => Promise<Record<string, string>>;
|
|
48
|
-
/** @deprecated use
|
|
48
|
+
/** @deprecated use callbacks.auth.allowClient callback instead */
|
|
49
49
|
allowClient?: (clientID: string, redirect: string) => Promise<boolean>;
|
|
50
|
-
/** @deprecated use
|
|
50
|
+
/** @deprecated use callbacks.auth.start callback instead */
|
|
51
51
|
onAuthorize?: (event: APIGatewayProxyEventV2) => Promise<void | keyof Providers>;
|
|
52
|
-
/** @deprecated use
|
|
52
|
+
/** @deprecated use callbacks.auth.success callback instead */
|
|
53
53
|
onSuccess?: (input: Result, response: OnSuccessResponder<Sessions["$typeValues"]>) => Promise<ReturnType<OnSuccessResponder<Sessions["$typeValues"]>[keyof OnSuccessResponder<any>]>>;
|
|
54
|
-
/** @deprecated
|
|
54
|
+
/** @deprecated */
|
|
55
55
|
onIndex?: (event: APIGatewayProxyEventV2) => Promise<APIGatewayProxyStructuredResultV2>;
|
|
56
56
|
/** @deprecated use on.error callback instead */
|
|
57
57
|
onError?: (error: MissingParameterError | UnauthorizedClientError | UnknownProviderError) => Promise<APIGatewayProxyStructuredResultV2 | undefined>;
|
|
@@ -56,38 +56,6 @@ export function AuthHandler(input) {
|
|
|
56
56
|
};
|
|
57
57
|
return ApiHandler(async (evt) => {
|
|
58
58
|
const step = usePathParam("step");
|
|
59
|
-
if (!step) {
|
|
60
|
-
if (input.callbacks.index) {
|
|
61
|
-
return input.callbacks.index(evt);
|
|
62
|
-
}
|
|
63
|
-
const clients = (await input.clients?.()) || {};
|
|
64
|
-
return {
|
|
65
|
-
statusCode: 200,
|
|
66
|
-
headers: {
|
|
67
|
-
"Content-Type": "text/html",
|
|
68
|
-
},
|
|
69
|
-
body: `
|
|
70
|
-
<html>
|
|
71
|
-
<head>
|
|
72
|
-
<link rel="icon" href="data:,">
|
|
73
|
-
</head>
|
|
74
|
-
<body>
|
|
75
|
-
<table>
|
|
76
|
-
<tr>${Object.keys(clients).map((client) => `<td>${client}</td>`)}</tr>
|
|
77
|
-
${Object.keys(input.providers).map((name) => {
|
|
78
|
-
return `<tr>
|
|
79
|
-
${Object.keys(clients).map((client_id) => {
|
|
80
|
-
const redirect_uri = clients[client_id];
|
|
81
|
-
return `<td><a href="/authorize?provider=${name}&response_type=token&client_id=${client_id}&redirect_uri=${redirect_uri}">${name} - ${client_id}</a></td>`;
|
|
82
|
-
})}
|
|
83
|
-
</tr>`;
|
|
84
|
-
})}
|
|
85
|
-
</table>
|
|
86
|
-
</body>
|
|
87
|
-
</html>
|
|
88
|
-
`,
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
59
|
if (step === "favicon.ico") {
|
|
92
60
|
return {
|
|
93
61
|
statusCode: 404,
|