WIP ws messages, TODO backend receiving frontend messages

This commit is contained in:
2025-02-19 09:28:13 -07:00
parent b37862a321
commit d2e378b4a3
12 changed files with 104 additions and 153 deletions
+2 -1
View File
@@ -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;
}
}