我在计算机上克隆这个存储库时遇到问题:
https://github.com/JL978/spotify-clone-server
还有:
https://github.com/JL978/spotify-clone-client
在克隆中服务器,我启动 npm 并收到“正在侦听端口:4000”消息,但是当我运行 Spotify-clone-client 时,我得到正常的界面,但是当我单击登录时按钮,我收到“INVALID_CLIENT:无效的重定向 URI”错误。我还将正确的内容放入 .env 文件中:
CLIENT_ID = (I wrote the client id on my Spotify dev dashboard here)
CLIENT_SECRET = (I revealed and wrote the client secret on my Spotify dev dashboard here)
FRONT_URI = http://localhost:3000
RE_URI = http://localhost:4000/callback
REXP = /\.localhost:3000/
此外,在 Spotify Dev 仪表板的“编辑设置”部分中,我将“http://localhost:4000/callback”添加到“重定向 URI”的文本字段中'。我没有更改源代码中的任何其他内容(如上所述),但我收到了错误。在存储库的自述文件中,没有其他需要执行的操作,还是我忽略了?
PS:我是开发新手,所以我从克隆开始。
I'm having a problem with this repository cloned on my computer:
https://github.com/JL978/spotify-clone-server
and also:
https://github.com/JL978/spotify-clone-client
In the clone server, I start the npm and a get the 'listening on port: 4000' message, but when I run the spotify-clone-client, I get the interface as normal, but when I click the log in button, I get the 'INVALID_CLIENT: Invalid redirect URI' error. I also put the correct things in the .env file:
CLIENT_ID = (I wrote the client id on my Spotify dev dashboard here)
CLIENT_SECRET = (I revealed and wrote the client secret on my Spotify dev dashboard here)
FRONT_URI = http://localhost:3000
RE_URI = http://localhost:4000/callback
REXP = /\.localhost:3000/
Also, in the Spotify Dev dashboard, in the 'Edit Settings' section, I added 'http://localhost:4000/callback' to the text field of the 'Redirect URIs'. I didn't change anything else in the source code (mentioned above), but I get the error. In the repository's README file, there's nothing else that needs to be done, or am I overlooking?
P.S: I'm new to developing, so I started off with cloning.
发布评论