Auth Process and example

Does someone have an example for the javascript & PHP code of the JWT auth process?

And what is the process that the user should walk threw in the extensions auth

Or if I will ask it differently, how can I get the viewer name after getting the auth object from Twitch.ext.onAuthorized

Cross Post User ID -> Username Retrieval

And see https://jwt.io/ for libraries and examples