decode static method
Implementation
static String? decode(String encoded, String secretKey) {
try {
final decoded = utf8.decode(base64Url.decode(encoded));
final parts = decoded.split(':');
if (parts.length < 2) return null;
parts.removeLast(); // remove key
return parts.join(':');
} catch (_) {
return null;
}
}