I just copied the OAuth part from another project. It works but someone should write tests for it in such a degree that we don't test pyjwt itself.