jonasroussel / dart_jsonwebtoken

A dart implementation of the famous javascript library 'jsonwebtoken'
MIT License
87 stars 29 forks source link

JWTUndefinedException: FormatException: Invalid encoding before padding (at character 11) #56

Closed PhanithNoch closed 5 months ago

PhanithNoch commented 5 months ago

Future<String?> fetchUserFromToken(String token) async { try { final jwt = JWT.verify(token, SecretKey("1234567890")); print("jwt: $jwt"); return jwt.payload as String; } on JWTException catch (e) { print(e); return null; } }

PhanithNoch commented 5 months ago

Sorry, that's my fault that I didn't check the documentation.