Skip to content

Commit

Permalink
Add "next" package dependency and update getAuth.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Adebesin-Cell committed Sep 17, 2024
1 parent 2495fcb commit f3b412f
Show file tree
Hide file tree
Showing 3 changed files with 198 additions and 4 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"react": "^18.0.0",
"react-dom": "^18.0.0",
"viem": "2.x",
"wagmi": "^2.12.4"
"wagmi": "^2.12.4",
"next": "14.2.8"
},
"files": [
"dist",
Expand Down
194 changes: 194 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/lib/getAuth.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"use server";

import { cookies } from "next/headers";
import { getCookie, deleteCookie } from "cookies-next";
import { verify } from "@everipedia/web3-signer";
import { AUTH_TOKEN_KEY } from "./constants";

export const getAuth = async () => {
const token = getCookie(AUTH_TOKEN_KEY) as string | undefined;
const token = getCookie(AUTH_TOKEN_KEY, { cookies }) as string | undefined;
let address: string | null = null;

if (token) {
Expand Down

0 comments on commit f3b412f

Please sign in to comment.