You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a duplicate of #967 which has been open since January 2024 without resolution. The TypeScript error in decodeJWTPayload function in auth-js is blocking our CI/CD pipeline as we cannot run TypeScript checks (tsc --noEmit --skipLibCheck --pretty) or ESLint validation before commits.
To Reproduce
Steps to reproduce:
Install supabase-js v2.45.2
Run TypeScript checks with tsc --noEmit --skipLibCheck --pretty
Observe TypeScript compilation errors due to incorrect typing in decodeJWTPayload
Expected behavior
The decodeJWTPayload function should be properly typed as shown in the original issue #967:
exportfunctiondecodeJWTPayload(token: string){// Regex checks for base64url formatconstbase64UrlRegex=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/iconstparts=token.split('.')if(parts.length!==3){thrownewError('JWT is not valid: not a JWT structure')}if(!base64UrlRegex.test(parts[1]asstring)){thrownewError('JWT is not valid: payload is not in base64url format')}constbase64Url=parts[1]asstring;returnJSON.parse(decodeBase64URL(base64Url))}
This issue is blocking our ability to maintain code quality through TypeScript and ESLint checks in our CI pipeline.
System information
OS: macOS
Browser: Chrome
Version of supabase-js: 2.45.2
Version of Node.js: 18.17.1
The text was updated successfully, but these errors were encountered:
Bug report
Describe the bug
This is a duplicate of #967 which has been open since January 2024 without resolution. The TypeScript error in
decodeJWTPayload
function in auth-js is blocking our CI/CD pipeline as we cannot run TypeScript checks (tsc --noEmit --skipLibCheck --pretty
) or ESLint validation before commits.To Reproduce
Steps to reproduce:
tsc --noEmit --skipLibCheck --pretty
decodeJWTPayload
Expected behavior
The
decodeJWTPayload
function should be properly typed as shown in the original issue #967:This issue is blocking our ability to maintain code quality through TypeScript and ESLint checks in our CI pipeline.
System information
The text was updated successfully, but these errors were encountered: