Skip to content
Snippets Groups Projects
Commit 5b28d3c4 authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

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

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