Novice to Okta. Trying to integrate Unity + Twitch

I feel like I’m way out of my depth here. To start, I am a indie Unity developer trying to do a game integrated with Twitch, and so far, the only way I’ve been able to do the Oauth2 loop is to use an embedded browser within the game. Wretched, I know.

This is where I’m at with Okta + Unity. I’ve followed the step by step on this video:

But what I was under the impression that I could do was send users to an endpoint on Okta for Twitch, they’d do the whole loop, and then return back to the Unity app. I do not see any of the endpoints, clientID, secret, etc. for the built in Twitch application integration on Okta. Am I way off the mark here?

When you say “Okta for Twitch”, are you talking about this app https://www.okta.com/integrations/twitch/?

If not, are you asking about adding Twitch as a generic OIDC IdP?

Thank you VERY much for replying. I am indeed referring to that application, however, being such a novice to Okta and this entire flow I can’t answer if adding Twitch as a generic OIDC IdP is the solution I’m looking for. I can only describe the flow I assumed was how this all worked, and if that is not possible then I misunderstood Okta’s use.

I was assuming that the Unity integration would send a call to Okta that a user is inbound from my desktop app, and then open a page on Okta to complete the oauth2 loop. This same page would also be consequently the redirect URI for Twitch. They would complete the loop, be sent back to the Okta page, return to the app, where the Unity integration would then connect to Okta and retrieve the token Okta had stored for that user. Forgive me if this is completely ignorant of Okta or secure flow.

That app only supports SWA which means the user will login using their own Twitch credentials.
https://support.okta.com/help/s/article/What-is-Secure-Web-Authentication-SWA

I believe the Unity setup uses OAuth/OIDC as shown in the blog post.

I’m assuming the script redirects to Okta to login and the user is then redirected back to the application. You could probably try to modify the script to authenticate using Twitch instead of Okta following the docs from Twtich

Ok I was afraid you were going to say that. The Okta Unity package has some C# dlls in it for authentication, but at it’s core it follows the same principle of starting a httplistener on localhost and waiting for the token to come back as other plugins I’ve seen.

I’ve already managed to do that, but for Twitch, they say that localhost can only be a redirect URI for testing. I was hoping that there was an endpoint that Okta stored a successful oauth loop that I could hit for the token after returning to the program. Something like [myapp].okta.com/endpoint?blahblah and when my program hit it after the oauth loop was done, could retrieve the tokens.

Do you know of any services that do something like that?