sst 3.0.1-20 → 3.0.1-22
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 +4 -0
- package/package.json +1 -1
package/dist/auth/handler.js
CHANGED
|
@@ -46,6 +46,8 @@ export function AuthHandler(input) {
|
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
+
console.log(process.env.AUTH_PRIVATE_KEY);
|
|
50
|
+
console.log(process.env.AUTH_PUBLIC_KEY);
|
|
49
51
|
const options = {
|
|
50
52
|
signing: {
|
|
51
53
|
privateKey: jose.importPKCS8(process.env.AUTH_PRIVATE_KEY, "RS512"),
|
|
@@ -115,6 +117,7 @@ export function AuthHandler(input) {
|
|
|
115
117
|
},
|
|
116
118
|
};
|
|
117
119
|
app.get("/token", async (c) => {
|
|
120
|
+
console.log("token request");
|
|
118
121
|
const form = await c.req.formData();
|
|
119
122
|
if (form.get("grant_type") !== "authorization_code") {
|
|
120
123
|
c.status(400);
|
|
@@ -140,6 +143,7 @@ export function AuthHandler(input) {
|
|
|
140
143
|
});
|
|
141
144
|
app.use("/:provider/authorize", async (c, next) => {
|
|
142
145
|
const provider = c.req.param("provider");
|
|
146
|
+
console.log("authorize request for", provider);
|
|
143
147
|
const response_type = c.req.query("response_type") || getCookie(c, "response_type");
|
|
144
148
|
const redirect_uri = c.req.query("redirect_uri") || getCookie(c, "redirect_uri");
|
|
145
149
|
const state = c.req.query("state") || getCookie(c, "state");
|