Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another case of 'INVALID_CLIENT: Invalid client' #28

Closed
ianaitch opened this issue Jan 4, 2022 · 10 comments
Closed

Another case of 'INVALID_CLIENT: Invalid client' #28

ianaitch opened this issue Jan 4, 2022 · 10 comments

Comments

@ianaitch
Copy link

ianaitch commented Jan 4, 2022

Hi,

I'm kind of new to some of this, so I may have made a dumb error.

I forked Nowify, deployed into Netlify, set up the spotify developer app, copied the client id and secret environment variables into Netlify environment settings. Also copied the URL of my app in Netlify into the redirect URI in the Spotify app. When I go to the Netlify URL I see the correct page
image
But every time I get this error after clicking login :-
image

It looks like I log in, authenticate and then fail.

The URL returned from Spotify is "https://accounts.spotify.com/authorize?client_id=undefined&response_type=code&redirect_uri=https%3A%2F%2F.netlify.app&state=uecd1nl93p6-o8fv91wagf-q3nxdwgkp-fsqelse9&scope=user-read-currently-playing

I looked at the other two issues where Invalid Client was mentioned and neither seemed to give a clue. Any ideas what I missed? I see that Client_Id is blank in the URL above.

All help always gratefully received!

@ianaitch
Copy link
Author

ianaitch commented Jan 4, 2022

(Yeah, the editor here just fiddled with my URL shown above because I tried to replace my URL with . The &redirect_uri I see in the URL is correct, and has the right text before .netlify.app).

@Dherdre
Copy link

Dherdre commented Feb 14, 2022

Hi,

Did you already found a fix?
I have the same problem.

Thanks in advance!

@JannisBluu
Copy link

Hey, I have the same problem. May you can help not only one, but directly two, who searches for help ;D

Best regards

@jonashcroft
Copy link
Owner

Hey! Sorry you've been having trouble with this.

A similar issue was mentioned in #27.

Are any of you able to confirm if this persists after redeploying when you add your keys in?

@Dherdre
Copy link

Dherdre commented Feb 15, 2022

Hi,

That did the trick!
Thank you!

@JannisBluu
Copy link

At first thanks for the fast support 🥇
Now I have the error message

INVALID_CLIENT: Invalid redirect URI

after clicking on the Log In Button.
I´ve added the client key and secret to netflify an deployed it as you describe in #27

Thanks in advance!

@jonashcroft
Copy link
Owner

jonashcroft commented Feb 16, 2022

That error means that your redirect URI is incorrect.

You need to add the URL of your app within My Applications on Spotify. This is described in the instructions in the dashboard.

The URI must match your own apps URL exactly.

@JannisBluu
Copy link

Thank you, now it works. I deleted the uri in spotify and copyed it again, now it works. ♥

@jonashcroft
Copy link
Owner

Great! Thank you. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants