Trouble Getting OIDC Access Token in Godot

Hi everyone,

I’ve been trying to make a little stream overlay in Godot 4.2 and have not been able to figure out authentication for a few days now. At the moment, I’m trying to get the access token back from the browser authentication, and all I’m getting in response is headers and not the new URI.

Per a couple of tutorials and the codebases of several other Twitch integration libraries, I’ve got a TCPServer set to listen to port 3000, and the redirect_url set to http://localhost:3000. I can successfully get a response from the browser, and even push a success page for the browser to show the user, but I can’t find a way to access the new URI. I don’t think I’m getting any errors, since the browser doesn’t seem to complain at all. Accepting the connection on port 3000 with a StreamPeerTCP and ingesting data only gives me headers.

Is there a trick to doing this in Godot? It seems like other Godot libraries can get away with parsing the response directly for the query string and don’t receive a big block of plaintext headers at all.

From what it seems like, they use TCPServer to send commands, and WebsocketPeer to poll for messages, I would try that avenue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.