WIP ws messages, TODO backend receiving frontend messages
This commit is contained in:
@@ -57,7 +57,7 @@ JWTBody? jwtBody(Ref ref) {
|
||||
final payload = JwtDecoder.tryDecode(jwtString);
|
||||
if (payload == null) {
|
||||
logger.fine('Failed to decode JWT, removing key.');
|
||||
ref.read(jwtNotifierProvider.notifier).eraseJwt();
|
||||
Future.delayed(const Duration(), () => ref.read(jwtNotifierProvider.notifier).eraseJwt());
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
@@ -66,6 +66,7 @@ JWTBody? jwtBody(Ref ref) {
|
||||
} catch (e) {
|
||||
logger.shout(
|
||||
'Failed to parse JWT payload to JWTBody, something is wrong.\nPayload: $payload', e, StackTrace.current);
|
||||
Future.delayed(const Duration(), () => ref.read(jwtNotifierProvider.notifier).eraseJwt());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user