softplayer-web/lib/api/grpc/creds.dart

22 lines
517 B
Dart
Raw Normal View History

2024-04-29 10:42:16 +00:00
import 'dart:html';
class SoftplayerCreds {
final String uuid;
final String token;
SoftplayerCreds({
required this.token,
required this.uuid,
});
}
class SoftplayerCredsHelpers {
String localStorageEntry(String key) => window.localStorage[key]!;
SoftplayerCreds fromLocalStorage() => SoftplayerCreds(
token: localStorageEntry("token"), uuid: localStorageEntry("uuid"));
2024-05-02 21:56:55 +00:00
void cleanupLocalStorate() {
window.localStorage.remove("token");
window.localStorage.remove("uuid");
}
2024-04-29 10:42:16 +00:00
}