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
I have created a JWT token and when I use it in supabase client with the session it throws an error. I tracked down the issue and its thrown in your library GoTrue, on setSession(accessToken: String, refreshToken: String).
The issue reported is the following: invalid JWT: unable to parse or verify signature, json: cannot unmarshal number 1673267144.2241859 into Go struct field GoTrueClaims.exp of type int64
I am creating the token like the following:
let jwtSigner = JWTSigner.hs256(key: pKey)
let exp = Date(timeIntervalSinceNow: 3600)
let header = Header(kid: SupabaseService.SupabaseAnoKey)
let claims = SupabaseClaims(userID: userID,
exp: exp)
var supJWT = JWT(header: header, claims: claims)
To Reproduce
Create a JWT token.
Add the token to the current supabase session try await client.auth.setSession(accessToken: token, refreshToken: refreshToken)
Get the error. invalid JWT: unable to parse or verify signature, json: cannot unmarshal number 1673267144.2241859 into Go struct field GoTrueClaims.exp of type int64
Expected behavior
It should let me do the request since the token is valid.
let expDouble = Date(timeIntervalSinceNow: 3600)
let d: Double = expDouble.timeIntervalSince1970
let i = Int(d)
let exp = Date(timeIntervalSinceNow: Double(i))
Bug report
I have created a JWT token and when I use it in
supabase client
with the session it throws an error. I tracked down the issue and its thrown in your library GoTrue, onsetSession(accessToken: String, refreshToken: String)
.The issue reported is the following:
invalid JWT: unable to parse or verify signature, json: cannot unmarshal number 1673267144.2241859 into Go struct field GoTrueClaims.exp of type int64
I am creating the token like the following:
To Reproduce
Create a JWT token.
Add the token to the current supabase session
try await client.auth.setSession(accessToken: token, refreshToken: refreshToken)
Get the error.
invalid JWT: unable to parse or verify signature, json: cannot unmarshal number 1673267144.2241859 into Go struct field GoTrueClaims.exp of type int64
Expected behavior
It should let me do the request since the token is valid.
System information
master
)The text was updated successfully, but these errors were encountered: