TSK-802: Save token to array (#2754)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov 2023-03-16 19:47:39 +05:00 committed by GitHub
parent 2401f0e6bc
commit 33b39ba594
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,7 @@
setMetadata(login.metadata.LoginToken, result.token) setMetadata(login.metadata.LoginToken, result.token)
const tokens: Record<string, string> = fetchMetadataLocalStorage(login.metadata.LoginTokens) ?? {} const tokens: Record<string, string> = fetchMetadataLocalStorage(login.metadata.LoginTokens) ?? {}
tokens[result.workspace] = result.token tokens[result.workspace] = result.token
setMetadataLocalStorage(login.metadata.LoginToken, result.token) setMetadataLocalStorage(login.metadata.LoginTokens, tokens)
setMetadataLocalStorage(login.metadata.LoginEndpoint, result.endpoint) setMetadataLocalStorage(login.metadata.LoginEndpoint, result.endpoint)
setMetadataLocalStorage(login.metadata.LoginEmail, result.email) setMetadataLocalStorage(login.metadata.LoginEmail, result.email)
navigate({ path: [workbenchId, result.workspace] }) navigate({ path: [workbenchId, result.workspace] })