repo_description: Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿
repo_topics: blockchain crypto dapp graphql hacktoberfest lens-protocol nextjs react social-media tailwindcss turborepo typescript vitest wagmi web3
code: import type { JwtPayload } from "@/types/jwt";
  
  const decoded = (str: string): string =>
    atob(str.replace(/-/g, "+").replace(/_/g, "/"));
  
  const parseJwt = (token: string): JwtPayload => {
    try {
      return JSON.parse(decoded(token.split(".")[1])) as JwtPayload;
    } catch {
      return {
        act: { sub: "" },
        exp: 0,
        sid: "",
        sub: ""
      };
    }
  };
  
  export default parseJwt;
  