Skip to content

Instantly share code, notes, and snippets.

View Lauro235's full-sized avatar

Lorentz Lauro235

View GitHub Profile
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));