We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15c2509 commit 878755dCopy full SHA for 878755d
packages/powersync/lib/src/connector.dart
@@ -113,12 +113,8 @@ class PowerSyncCredentials {
113
try {
114
List<String> parts = token.split('.');
115
if (parts.length == 3) {
116
- String part = parts[1];
117
// dart:convert doesn't like missing padding
118
- if (part.length % 4 > 0) {
119
- part += '=' * (4 - part.length % 4);
120
- }
121
- final rawData = base64Decode(part);
+ final rawData = base64Url.decode(base64.normalize(parts[1]));
122
final text = Utf8Decoder().convert(rawData);
123
Map<String, dynamic> payload = jsonDecode(text);
124
if (payload.containsKey('exp') && payload['exp'] is int) {
0 commit comments