You need to enable request ID Sharing.
Then ask the user to login/share their ID with your extension.
Then you will have access to the users Twitch ID via the helper (in window.Twitch.ext.viewer.id:) and the JWT.
The opaqueUserID is more like a sessionID it does not represent a user. So you cannot convert an opaque to a real. Further reading on opaqueID’s - Extensions | Twitch Developers and Required Technical Background | Twitch Developers
Full Example project: GitHub - BarryCarlyon/twitch_profile_extension: A simple Twitch Extension to cover the basics of using the JWT and EBS together to get Twitch API information