Best way to handle OAuth to other services

then you just need to do oAuth and whitelist id.twitch.tv for your config panel. You should need to add one any extra parameters. You can pass information using the state parameter.

or whitelist your EBS,
link from your config to your EBS,
build a state payload, store that in your DB,
add a state parameter to the redirect to twitch to ID the payload.
And twitch passes the state parameter back to you on the code return.
Do what you need and redirect back to the panel