Don't expose Last.fm API Key in the index.html

This commit is contained in:
Deluan
2024-01-29 21:41:54 -05:00
parent 3a9b3452a2
commit 1f71e56741
6 changed files with 11 additions and 16 deletions
+1 -2
View File
@@ -7,7 +7,6 @@ import {
Switch,
} from '@material-ui/core'
import { useInterval } from '../common'
import config from '../config'
import { baseUrl, openInNewTab } from '../utils'
import { httpClient } from '../dataProvider'
@@ -24,7 +23,7 @@ const Progress = (props) => {
)
const callbackUrl = `${window.location.origin}${callbackEndpoint}`
openedTab.current = openInNewTab(
`https://www.last.fm/api/auth/?api_key=${config.lastFMApiKey}&cb=${callbackUrl}`,
`https://www.last.fm/api/auth/?api_key=${localStorage.getItem('lastfm-apikey')}&cb=${callbackUrl}`,
)
}, [])