ghostfolio/apps/client/src/app/services/settings-storage.service.ts
Matthias Frey e87c942cb8
Add webauthn (#82)
* Add webauthn

* Complete WebAuthn device sign up and login

* Move device registration to account page
* Replace the token login with a WebAuthn prompt if the current device has been registered
* Mark the current device in the list of registered auth devices

* Fix after rebase

* Fix tests

* Disable "Add current device" button if current device is registered

* Add option to "Stay signed in"

* Remove device list feature, sign in with deviceId instead

* Improve usability

* Update changelog

Co-authored-by: Matthias Frey <mfrey43@gmail.com>
Co-authored-by: Thomas <4159106+dtslvr@users.noreply.github.com>
2021-06-14 16:09:40 +02:00

23 lines
478 B
TypeScript

import { Injectable } from '@angular/core';
export const RANGE = 'range';
@Injectable({
providedIn: 'root'
})
export class SettingsStorageService {
public constructor() {}
public getSetting(aKey: string): string {
return window.localStorage.getItem(aKey);
}
public setSetting(aKey: string, aValue: string) {
window.localStorage.setItem(aKey, aValue);
}
public removeSetting(aKey: string): void {
return window.localStorage.removeItem(aKey);
}
}