Skip to content
Snippets Groups Projects
Commit 17955e1e authored by Petar Hristov's avatar Petar Hristov :speech_balloon:
Browse files

Merge branch 'Issue/1833-newLogin' into 'dev'

Update: Handle LocalStorage Coscine Values (coscine/issues#1833)

See merge request !4
parents 8b4b3916 aa8922fd
Branches
No related tags found
2 merge requests!5Release: Sprint/2022-03,!4Update: Handle LocalStorage Coscine Values (coscine/issues#1833)
using Coscine.Configuration; using Coscine.Configuration;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -64,7 +64,14 @@ namespace Coscine.CodeGen.CodeGenerator ...@@ -64,7 +64,14 @@ namespace Coscine.CodeGen.CodeGenerator
combinationFileText += @" combinationFileText += @"
if (typeof coscine !== 'undefined' && typeof coscine.authorization !== 'undefined') { if (typeof coscine !== 'undefined' && typeof coscine.authorization !== 'undefined') {
accessToken = coscine.authorization.bearer; accessToken = 'Bearer ' + coscine.authorization.bearer;
}
if (typeof window !== 'undefined') {
// LocalStorage > Global Variables
const localStorageToken = localStorage.getItem('coscine.authorization.bearer');
if (localStorageToken) {
accessToken = 'Bearer ' + localStorageToken;
}
} }
const getHostName = () => { const getHostName = () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment