Skip to content

Commit

Permalink
fix(cors): fix profile sdk env
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricmagne committed Sep 23, 2024
1 parent 4db208f commit c6fde0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/siwsrp/auth.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import { SDK } from "@metamask/profile-sync-controller";
import jwt from "jsonwebtoken";

Expand All @@ -10,14 +11,16 @@ type HydraEnv = {
};

const { AuthType, Env, getEnvUrls, JwtBearerAuth, Platform } = SDK;
const { siteConfig } = useDocusaurusContext();
const { VERCEL_ENV } = siteConfig?.customFields || {};
export const AUTH_WALLET_SESSION_NAME = "auth.wallet.session";
export const AUTH_WALLET_TOKEN = "auth.wallet.token";
export const AUTH_WALLET_PROJECTS = "auth.wallet.projects";

export const getHydraEnv = (): HydraEnv => {
const platform = Platform.INFURA;

if (process.env.VERCEL_ENV === "production") {
if (VERCEL_ENV === "production") {
return {
...getEnvUrls(Env.PRD),
env: Env.PRD,
Expand Down

0 comments on commit c6fde0a

Please sign in to comment.