File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ from a discord bot. This application uses [Discord.js v14](https://www.npmjs.com
3232 - App Name: ` Spotify Manager `
3333 - App Description:
3434 ` Control spotify via a discord bot! What could go wrong? Allow anyone to queue songs, manage playback status and more all from a discord bot. `
35- - Redirect URIs: ` http://localhost :18173/auth/callback `
35+ - Redirect URIs: ` http://127.0.0.1 :18173/auth/callback `
3636 - Which API/SDKs are you planning to use?: ` Web API `
37374 . Click on ` Save `
3838
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class CallbackRoute extends Route {
2727 params . append ( 'client_id' , this . spotify . Application . config . spotifyClientId ) ;
2828 params . append ( 'grant_type' , 'authorization_code' ) ;
2929 params . append ( 'code' , code ) ;
30- params . append ( 'redirect_uri' , `http://localhost :${ this . spotify . Application . config . port } /auth/callback` ) ;
30+ params . append ( 'redirect_uri' , `http://127.0.0.1 :${ this . spotify . Application . config . port } /auth/callback` ) ;
3131 params . append ( 'code_verifier' , verifier ! ) ;
3232 const result = await fetch ( 'https://accounts.spotify.com/api/token' , {
3333 method : 'POST' ,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class AuthRoute extends Route {
1616 const params = new URLSearchParams ( ) ;
1717 params . append ( 'client_id' , this . spotify . Application . config . spotifyClientId ) ;
1818 params . append ( 'response_type' , 'code' ) ;
19- params . append ( 'redirect_uri' , `http://localhost :${ this . spotify . Application . config . port } /auth/callback` ) ;
19+ params . append ( 'redirect_uri' , `http://127.0.0.1 :${ this . spotify . Application . config . port } /auth/callback` ) ;
2020 params . append ( 'scope' , this . spotify . scopes . join ( ' ' ) ) ;
2121 params . append ( 'code_challenge_method' , 'S256' ) ;
2222 params . append ( 'code_challenge' , challenge ) ;
Original file line number Diff line number Diff line change 1- /* eslint-disable camelcase */ import Route from '../../Private/BaseRoute' ;
1+ /* eslint-disable camelcase */
2+ import Route from '../../Private/BaseRoute' ;
23import SpotifyManager from '../../SpotifyManager' ;
34import { Request , Response } from 'express' ;
45
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class SpotifyManager {
3434 this . token = null ;
3535 this . interval = setInterval ( async ( ) => {
3636 if ( this . token ) {
37- const res = await fetch ( `http://localhost :${ this . Application . config . port } /auth/refresh` ) ;
37+ const res = await fetch ( `http://127.0.0.1 :${ this . Application . config . port } /auth/refresh` ) ;
3838 if ( 200 !== res . status ) {
3939 this . Application . Logger . warn ( 'Token refresh failed.' ) ;
4040 return ;
@@ -55,7 +55,7 @@ class SpotifyManager {
5555 this . expressServer . get ( route . path , route . handle . bind ( route ) ) ;
5656 }
5757 this . expressServer . listen ( this . Application . config . port , ( ) => {
58- this . Application . Logger . other ( `Proxy server listening at http://localhost :${ this . Application . config . port } ` ) ;
58+ this . Application . Logger . other ( `Proxy server listening at http://127.0.0.1 :${ this . Application . config . port } ` ) ;
5959 } ) ;
6060 }
6161}
You can’t perform that action at this time.
0 commit comments