Opaque ID Guidance


I’m currently using opaque ids from logged in viewers to track their progress in my extension for months. Recently I have been receiving reports of progress being reset for users which is due to their opaque id being changed. After reading the docs at https://dev.twitch.tv/docs/extensions/required-technical-background/#opaque-ids it seemed that opaque id was the desired approach since I do not need their twitch id for any reason.

Added emphasis…

Opaque IDs persist across all channels, and they do not change unless viewers explicitly request a change (rotation). We encourage developers 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, use the Request Identity Link field on the Extensions Manager Capabilities tab.

Looking through some other posts in this topic I see reply’s that discourage use of the opaque id for tracking users which seems to contradict the documentation.

I also found this post which mentions that Revoke Identity from an extension will generate a new opaque id for a user. This is undesirable. If the ID is supposed to persist across all channels then revoking identity from one extension could be resetting a viewers opaque id for my extension as well? Any chance I can help these users find their old opaque id and reclaim their progress in my extension?

It is expected to change only if they revoke from your extension, but since you are not asking for their TwitchID then you won’t get a change, in theory.

An opaqueID should be considered as “the ID of a user, to let them play the demo of my game then after a level or two I would prompt them to login to save their progress”

Basically an opaqueID is not 100% safe to use in the way you are using it due to the many criteria it could reset.

Let alone, for example, a given Twitch user can have multiple opaqueID’s if they access via another browser or computer.

To save progress, you should ask for their real Twitch ID in order to save that progress against the real unchangeable ID

An OpaqueID should be treated as “user is not logged into my website sessionID”

It can change, and we don’t know all the criteria that could result in it changing, so if you want to save progress, get the definitely unchangeable ID rather than the might change ID.

Users may also feel safer using your extension if they share their real ID to save progress