Lionel
04/24/2023, 4:19 PMrp_st
04/24/2023, 4:20 PMLionel
04/24/2023, 4:21 PMLionel
04/24/2023, 4:21 PMrp_st
04/24/2023, 4:22 PMLionel
04/24/2023, 7:25 PMLionel
04/24/2023, 7:25 PMrp_st
04/25/2023, 6:26 AMrp_st
04/25/2023, 6:26 AMnkshah2
04/25/2023, 6:44 AMcrypto.getcurves
?rp_st
04/25/2023, 6:45 AMLionel
04/25/2023, 12:11 PMLionel
04/25/2023, 4:27 PMhttps://cdn.discordapp.com/attachments/1100093722655465564/1100457972120944709/image.png▾
Lionel
04/25/2023, 4:27 PMLionel
04/25/2023, 4:28 PMLionel
04/25/2023, 4:28 PMLionel
04/25/2023, 4:29 PMLionel
04/25/2023, 4:30 PMrp_st
04/26/2023, 5:17 AMnkshah2
04/26/2023, 5:39 AMLionel
04/27/2023, 6:19 PMLionel
04/27/2023, 6:19 PMLionel
04/27/2023, 6:23 PMts
// deno-lint-ignore-file no-explicit-any
import express from "npm:express@latest";
import supertokens from "npm:supertokens-node@latest"
import Session from "npm:supertokens-node@latest/recipe/session/index.js";
import Passwordless from "npm:supertokens-node@latest/recipe/passwordless/index.js";
import cors from "npm:cors@latest";
import {middleware} from "npm:supertokens-node@latest/framework/express/index.js";
import {errorHandler} from "npm:supertokens-node@latest/framework/express/index.js";
import { verifySession } from "npm:supertokens-node@latest/recipe/session/framework/express/index.js";
import { SessionRequest } from "npm:supertokens-node@latest/framework/express/index.js";
import Dashboard from "npm:supertokens-node@latest/recipe/dashboard/index.js";
const app = express();
supertokens.init({
framework: "express",
supertokens: {
connectionURI: "x",
apiKey: "x",
},
appInfo: {
appName: "L-test-space",
apiDomain: "http://localhost:8080",
websiteDomain: "http://localhost:3000",
apiBasePath: "/auth",
websiteBasePath: "/auth"
},
recipeList: [
Passwordless.init({
flowType: "USER_INPUT_CODE_AND_MAGIC_LINK",
contactMethod: "EMAIL"
}),
Dashboard.init(),
Session.init()
]
});
app.use(cors({
origin: "http://localhost:3000",
allowedHeaders: ["content-type", ...supertokens.getAllCORSHeaders()],
credentials: true,
}));
app.use(middleware());
app.get("/", verifySession(), (_req:SessionRequest, res: any) => {
res.send("Welcome to the Dinosaur API!");
});
app.get('/login',function(_req: any,res: any) {
res.sendFile('login.html', {root: 'public'});
});
app.use('/scripts', express.static('scripts'))
app.use(errorHandler())
app.listen(8080, () => {
console.log("Running ✅")
});
Lionel
04/27/2023, 6:24 PMLionel
04/27/2023, 6:24 PMLionel
04/27/2023, 6:25 PMLionel
04/27/2023, 6:27 PMLionel
04/27/2023, 6:30 PMrp_st
04/28/2023, 5:22 AMnkshah2
04/28/2023, 5:24 AMLionel
04/29/2023, 5:17 PMLionel
04/29/2023, 5:25 PMhttps://cdn.discordapp.com/attachments/1100093722655465564/1101922232869076992/image.png▾
Lionel
04/29/2023, 5:25 PMLionel
04/29/2023, 5:26 PMLionel
04/29/2023, 5:26 PMLionel
04/29/2023, 5:26 PMLionel
04/29/2023, 5:26 PMLionel
04/29/2023, 5:27 PMLionel
04/29/2023, 5:27 PMnkshah2
04/29/2023, 5:37 PMLionel
04/29/2023, 5:37 PMLionel
04/29/2023, 5:38 PMLionel
04/29/2023, 5:38 PM