mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-09-19 10:02:55 +00:00
Fix: Only replace when access_token is present
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
7a66a89f50
commit
1ea10da921
@ -88,7 +88,9 @@ const app = createApp({
|
|||||||
this.tokenUser = username
|
this.tokenUser = username
|
||||||
window.localStorage.setItem('twitch-bot-token', JSON.stringify({ expiresAt, token, username }))
|
window.localStorage.setItem('twitch-bot-token', JSON.stringify({ expiresAt, token, username }))
|
||||||
// Nuke the Twitch auth-response from the browser history
|
// Nuke the Twitch auth-response from the browser history
|
||||||
this.$router.replace({ name: 'dashboard' })
|
if (window.location.hash.includes('access_token=')) {
|
||||||
|
this.$router.replace({ name: 'dashboard' })
|
||||||
|
}
|
||||||
|
|
||||||
fetch(`config-editor/user?user=${this.tokenUser}`, this.$root.fetchOpts)
|
fetch(`config-editor/user?user=${this.tokenUser}`, this.$root.fetchOpts)
|
||||||
.then((resp: Response) => this.$root.parseResponseFromJSON(resp))
|
.then((resp: Response) => this.$root.parseResponseFromJSON(resp))
|
||||||
|
Loading…
Reference in New Issue
Block a user