sst 3.0.1-30 → 3.0.1-32
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/handler.js +8 -1
- package/package.json +1 -1
package/dist/auth/handler.js
CHANGED
|
@@ -101,7 +101,10 @@ export function AuthHandler(input) {
|
|
|
101
101
|
ctx.status(400);
|
|
102
102
|
return ctx.text(`Unsupported response_type: ${response_type}`);
|
|
103
103
|
},
|
|
104
|
-
},
|
|
104
|
+
}, {
|
|
105
|
+
type: ctx.get("provider"),
|
|
106
|
+
...properties,
|
|
107
|
+
}, ctx.req.raw);
|
|
105
108
|
},
|
|
106
109
|
forward(ctx, response) {
|
|
107
110
|
return ctx.newResponse(response.body, response.status, Object.fromEntries(response.headers.entries()));
|
|
@@ -170,6 +173,10 @@ export function AuthHandler(input) {
|
|
|
170
173
|
});
|
|
171
174
|
for (const [name, value] of Object.entries(input.providers)) {
|
|
172
175
|
const route = new Hono();
|
|
176
|
+
route.use(async (c, next) => {
|
|
177
|
+
c.set("provider", name);
|
|
178
|
+
await next();
|
|
179
|
+
});
|
|
173
180
|
value(route, {
|
|
174
181
|
name,
|
|
175
182
|
...options,
|