blob: fe5362468e9406974651406beb2e918f6e44e36a [file] [log] [blame]
// Copyright (c) 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:html';
const String _kTokenStorageKey = 'github-token';
String get token => window.localStorage[_kTokenStorageKey];
set token(String value) => window.localStorage[_kTokenStorageKey] = value;
bool get isSignedIn {
return window.localStorage.containsKey(_kTokenStorageKey);
}
void signOut() {
window.localStorage.remove(_kTokenStorageKey);
}