Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix next endpoints
  • Loading branch information
adam-maj committed Aug 31, 2022
commit 8bad132ebe90ac5017080178f5503157b678d155
2 changes: 1 addition & 1 deletion packages/auth/src/next/routes/login.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ThirdwebAuthContext } from "../types";
import { LoginPayload } from "@thirdweb-dev/sdk/dist/src/schema";
import { LoginPayload } from "@thirdweb-dev/sdk";
import { serialize } from "cookie";
import { NextApiRequest, NextApiResponse } from "next";

Expand Down
6 changes: 6 additions & 0 deletions packages/auth/src/next/routes/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ export default async function handler(
res: NextApiResponse,
ctx: ThirdwebAuthContext
) {
if (req.method !== "GET") {
return res.status(400).json({
error: "Invalid method. Only GET supported.",
});
}

const { sdk, domain } = ctx;
let user = null;
const token = req.cookies.thirdweb_auth_token;
Expand Down