Reconciling Opaque UserID and Twitch UserID Oauth2

Twitch Extension docs encourages using opaque IDs as keys to store per user information twitch extension. This all makes sense if we stay within the extension ecosystem.
If we were to use Twitch Oauth2 for our users when accessing us outside twitch extension (for example accessing a standalone webapp for mobile outside twitch website to cover the fact that twitch does not support extension on mobile yet).

Is it possible to get the opaque ID from a twitch user ID using the Oauth2 flow ?

Ideally i would like to reconcile user generated information no matter if they have been created within a twitch extension by a logged in user (that might no have revealed his twitch ID on twitch website) and the same user that logged in a standalone Oauth2 flow outside twitch extension.

thanks!
-seb

I don’t think you can, but perhaps the opposite might be possible:

“Opaque IDs persist across all channels, and they do not change unless the viewer explicitly requests to rotate his identity. Developers are encouraged to use their EBS to store per-viewer information, using opaque IDs as keys. If your extension needs to know the viewer’s numeric Twitch ID, check the box under Request Identity Link in the extension’s Extension Capabilities section. Once the viewer accepts your request to share his Twitch identity, his numeric Twitch ID is provided in the Extension Helper’s onAuthorized() callback function.”

So maybe you can use this to link them? Hope it helps

No, OpaqueID’s are just temporary ID’s and belong to no one

OpaqueID can and will change at will.

I have observed:

  • Loads page, has OpaqueID ( a )
  • Grants, has OpaqueID ( b )
  • Ungrants, has OpaqueID ( c )

There is not and should not be a way to a link OpaqueID to TwitchID as then you are tracking users before they granted. This might have changed but that is the behaviour I have observed. OpaqueID’s change at will.

1 Like