mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 08:35:43 -06:00
14 lines
292 B
TypeScript
14 lines
292 B
TypeScript
|
let cachedToken = '';
|
||
|
|
||
|
export const loadUrlToken = (): string | null => {
|
||
|
const params = new URLSearchParams(window.location.search);
|
||
|
|
||
|
const token = params.get('auth_token');
|
||
|
if (token !== null && token !== '') {
|
||
|
cachedToken = token;
|
||
|
return token;
|
||
|
}
|
||
|
|
||
|
return cachedToken;
|
||
|
};
|