issork / gift

Godot IRC For Twitch addon
MIT License
150 stars 23 forks source link

Dictionary key error if invalid secret is used after successful login #35

Closed JFurness1 closed 9 months ago

JFurness1 commented 10 months ago

I had GIFT up and running. Great add-on, thanks for all your work!

I accidentally committed my secret to my repo (despite making an auth file to avoid that 😒) so I created a new secret at dev.twitch.tv and updated the secret in the auth file.

Now attempting to connect I receive a 403: Invalid client secret response and the add-on crashes at line 174 in gift_node.gd.

image

issork commented 10 months ago

Try deleting the file located at user://gift/auth/user_token and let me know if that fixes it - will fix this problem in a future update if it does.

JFurness1 commented 9 months ago

No fix from that.

I think the problem is that when the 403 is returned the token dictionary has only two entries, neither of which is "access token".

issork commented 9 months ago

This should now be solved with the rewrite.

PS: Also no more accidentally pushing client secrets since the Implicit Grant Flow is now supported. Now you can comfortably ship your games with your client_id included in the exported project and users no longer have to create their own apps through the developer console.