Spotify4Unity icon indicating copy to clipboard operation
Spotify4Unity copied to clipboard

Authorization Issue

Open tempostudios opened this issue 2 years ago • 2 comments

Unity 2021.1.10f1

Followed steps in Setup and created an app in Spotify.

Clicking "Sign In" brings me to the "Allow Access" page in Chrome (or Safari), but clicking "Accept" leads me to a 403 error.

I have the same callback URI listed in Unity and on the Spotify developer app settings.

Tried several different ports with the same result.

Reese

tempostudios avatar Feb 18 '23 00:02 tempostudios

This is due to newer versions of macOS reserving port 5000 for something else. See here: https://stackoverflow.com/questions/70913242/access-to-localhost-was-denied-you-dont-have-authorisation-to-view-this-page-h

Easy fix is just to change the port number.

Would suggest to the package owner to use a different default port or document this somewhere.

Additionally, the server port is not actually exposed on PKCEAuthConfigView.cs which makes the port a bit of a pain to change, as it is serialized but not exposed, so changing the default value in the script actually doesn't change the serialized values already on the scene.

push-pop avatar Mar 31 '23 15:03 push-pop

This is due to newer versions of macOS reserving port 5000 for something else. See here: https://stackoverflow.com/questions/70913242/access-to-localhost-was-denied-you-dont-have-authorisation-to-view-this-page-h

Easy fix is just to change the port number.

Would suggest to the package owner to use a different default port or document this somewhere.

Additionally, the server port is not actually exposed on PKCEAuthConfigView.cs which makes the port a bit of a pain to change, as it is serialized but not exposed, so changing the default value in the script actually doesn't change the serialized values already on the scene.

Thank you, it worked!

For the editor stuff, I have added this line in the AuthorizationConfigView.cs:

content = new GUIContent("Server Port", "Server Port");
_config.ServerPort = EditorGUILayout.IntField(content, _config.ServerPort);

yusuf-begames avatar May 17 '23 12:05 yusuf-begames