When someone logs in on my website through Auth0, I get a JWT token from Auth0. This token tells me the UID of the person and allows me to make API calls from the frontend to the backend where I can validate the JWT token to make sure the request comes from a logged in user.
On https://jwt.io you can paste any JWT token and it'll parse it and verify the signature.
Does anyone know how I can do this in python?
Auth0 doesn't give me the private key of the JWT token, so I can't use jwt.decode().
Instead I need to somehow parse the JWT token with its public key, but I'm not sure how to retrieve it in python.
This is the JWT token:
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImZneF9xWEJVNWt0ZzZXSlNLdTJIdiJ9.eyJuaWNrbmFtZSI6ImpvaG5fbWFyayIsIm5hbWUiOiJqb2huX21hcmtAb3V0bG9vay5jb20iLCJwaWN0dXJlIjoiaHR0cHM6Ly9zLmdyYXZhdGFyLmNvbS9hdmF0YXIvNTMxZmJlZjcxN2I1NzVmYjU3MGJlYzcxNTBlOWQ4MTA_cz00ODAmcj1wZyZkPWh0dHBzJTNBJTJGJTJGY2RuLmF1dGgwLmNvbSUyRmF2YXRhcnMlMkZqby5wbmciLCJ1cGRhdGVkX2F0IjoiMjAyMi0wNC0wNVQxNDoyMzozNy42NTFaIiwiZW1haWwiOiJqb2huX21hcmtAb3V0bG9vay5jb20iLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImlzcyI6Imh0dHBzOi8vZGV2LW44Z2h5a3lvLnVzLmF1dGgwLmNvbS8iLCJzdWIiOiJhdXRoMHw2MTdiZTllMzJhMmYyNjAwNmEzZDlhM2EiLCJhdWQiOiIwUGwwR1F5cFhjNkZEakxhb0JuSjhzOEtNZjVKZ3J4bSIsImlhdCI6MTY0OTE2ODYyMiwiZXhwIjoxNjQ5MjA0NjIyLCJub25jZSI6IlJuTjBmbFoyU0Vkck4wSkhRV1EyY21FMk1rNUpXVlUzTW1jM2RtaHlXVkJWYm5oalowMUNUR1paU3c9PSJ9.NQBQPoEj6wzYzclrQzXAWh124gyg_Nf1UYZR4lAuqHZ-fdFycrBMA0Y0dBSvQ-WI7YZOMAP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