From 52f77c0277e07a627f07ecfdeb0e2a7ef2066913 Mon Sep 17 00:00:00 2001 From: Justin Baur Date: Thu, 10 Feb 2022 21:22:18 -0500 Subject: [PATCH] Fix new device login (#664) * Store appId in localStorage * Save to local as well --- common/src/services/appId.service.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/src/services/appId.service.ts b/common/src/services/appId.service.ts index 8ffd20f90c..f1841a4cc4 100644 --- a/common/src/services/appId.service.ts +++ b/common/src/services/appId.service.ts @@ -2,6 +2,7 @@ import { Utils } from "../misc/utils"; import { AppIdService as AppIdServiceAbstraction } from "../abstractions/appId.service"; import { StorageService } from "../abstractions/storage.service"; +import { HtmlStorageLocation } from "../enums/htmlStorageLocation"; export class AppIdService implements AppIdServiceAbstraction { constructor(private storageService: StorageService) {} @@ -15,13 +16,17 @@ export class AppIdService implements AppIdServiceAbstraction { } private async makeAndGetAppId(key: string) { - const existingId = await this.storageService.get(key); + const existingId = await this.storageService.get(key, { + htmlStorageLocation: HtmlStorageLocation.Local, + }); if (existingId != null) { return existingId; } const guid = Utils.newGuid(); - await this.storageService.save(key, guid); + await this.storageService.save(key, guid, { + htmlStorageLocation: HtmlStorageLocation.Local, + }); return guid; } }