This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const redirect = document.getElementById("redirect"); | |
const token = document.getElementById("token"); | |
const clientId = 'some_id'; | |
const redirectUri = 'http://localhost:3000'; | |
const authUrl = new URL("https://accounts.spotify.com/authorize") | |
const generateRandomString = (length) => { | |
const possible = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~'; | |
const values = crypto.getRandomValues(new Uint8Array(length)); |