Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
11 lines
418 B
Text
11 lines
418 B
Text
import { readFile } from "fs/promises";
|
|
import { getSSOTokenFilepath } from "./getSSOTokenFilepath";
|
|
export const tokenIntercept = {};
|
|
export const getSSOTokenFromFile = async (id) => {
|
|
if (tokenIntercept[id]) {
|
|
return tokenIntercept[id];
|
|
}
|
|
const ssoTokenFilepath = getSSOTokenFilepath(id);
|
|
const ssoTokenText = await readFile(ssoTokenFilepath, "utf8");
|
|
return JSON.parse(ssoTokenText);
|
|
};
|