I’m trying to create an extension for the EVE Online game. From the config panel, I want the broadcaster to log into their EVE Online account. From what I gather, however, this is done by redirecting the user to their Single-Sign On page (SSO).
As part of the url for the SSO, there is a redirect uri parameter for when the user has finished logging in, it will then send a POST request to the redirect url with a code parameter you can use to authenticate them with. It looks something like this:
https://{login server base url}/oauth/authorize?response_type={response type}&redirect_uri={redirect uri}&client_id={client id}&scope={scopes}&state={state}
The redirect uri is an endpoint in my EBS. Then when the redirect url is called from the API, it contains an authentication code like this:
http://localhost/oauth-callback?code=ckEZIa6JUOdoN6ijmqBI...qgpU-SmPsZ0
In the above example, my redirect uri
would be http://localhost/oauth-callback
, which points to my EBS.
The problem I have now is that I don’t know how to map the Twitch user logged in to the config panel to the code in the EBS callback. In other words, I don’t know how to map the broadcaster to their EVE Online character. This is because the callback is sent from the EVE Online API and not from the config panel directly. I can’t just include the twitch user’s client id in the callback url either because I have to whitelist the url in the extension settings (at least I don’t think I can, please correct me if I’m wrong).
Is there a way I can have the redirect uri return to the config panel? That way I could send the code to the EBS from the config panel with the Twitch user’s info and map the two together.
If not, then I need some help figuring out how to map the twitch broadcaster to their EVE Online character after signing in with the SSO.