28 lines
955 B
HTML
28 lines
955 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Spotify Callback</title>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
// Get the authorization code from URL parameters
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
const code = urlParams.get('code');
|
|
const error = urlParams.get('error');
|
|
|
|
if (error) {
|
|
// Redirect back to main app with error
|
|
window.location.href = 'http://localhost:3001/?error=' + encodeURIComponent(error);
|
|
} else if (code) {
|
|
// Redirect back to main app with code
|
|
window.location.href = 'http://localhost:3001/callback?code=' + encodeURIComponent(code);
|
|
} else {
|
|
// No code or error, redirect to main app
|
|
window.location.href = 'http://localhost:3001/';
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|