Skip to content

Commit

Permalink
properly parse JWT within realtime client
Browse files Browse the repository at this point in the history
  • Loading branch information
dshukertjr committed Dec 16, 2024
1 parent 54ae4af commit eefb5bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/realtime_client/lib/src/realtime_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ class RealtimeClient {
Map<String, dynamic>? parsed;
try {
final decoded =
utf8.decode(base64Url.decode(tokenToSend.split('.')[1]));
parsed = json.decode(decoded);
base64.decode(base64.normalize(tokenToSend.split('.')[1]));
parsed = json.decode(utf8.decode(decoded));
} catch (e) {
// ignore parsing errors
}
Expand Down

0 comments on commit eefb5bb

Please sign in to comment.