skip to Main Content

Javascript – JWT verification with jose is failing

I have the following Next.js/Clerk.js middleware: import { authMiddleware } from "@clerk/nextjs"; import { jwtVerify } from "jose"; export default authMiddleware({ publicRoutes: ["/", "/contact", "/pricing", "/api/webhooks/user", "/api/reviews/add", "/api/user"], afterAuth (auth, req, evt) { const secret = new TextEncoder().encode (process.env.CLERK_PUBLIC_KEY) const…

VIEW QUESTION

Flutter – Can't verify signature for cognito access token

I'm using this below to get the access token of a logged in user. Future<void> fetchCognitoAuthSession() async { try { final cognitoPlugin = Amplify.Auth.getPlugin(AmplifyAuthCognito.pluginKey); final result = await cognitoPlugin.fetchAuthSession(); final userPoolTokensResult = result.userPoolTokensResult.toJson(); safePrint("Current user's userPoolTokensResult: $userPoolTokensResult"); } on AuthException…

VIEW QUESTION
Back To Top
Search