I faced the same issue, and after extensive research, I found a suggestion that worked as a solution. I downgraded PyJWT from 2.10.1 to 2.9.0