@comlarsic A very cool idea!
Kodi plugins work in Python, you can take authorization algorithms and program work from them
You can use the Morph browser component to play the video.
You can see how this is implemented by me
The video player code itself is here https://github.com/pavelprosto94/uvideo/blob/main/src/index.html