Mgregchi
KKinde
•Created by iamaman on 4/15/2024 in #💻┃support
How to validate an access token in Python?
I finally made it to work...
As stated on the doc, you have to grab the well-known keys from
https://yourbiz.kinde.com/.well-known/jwks then use it to validate the access token.
For Python I used the recommended jwkest
Example code
This function fetches the JWKS from the provided URL, and then uses the fetched keys to verify the JWT. If the verification is successful, it returns the verified payload; otherwise, it returns
false
.
Make sure to replace <your_subdomain>
with your actual Kinde subdomain.
Note: The fetchJwks
function is used to fetch the JWKS from the endpoint, and the verifyJwt
function is used to verify the JWT using the fetched keys.
Used Jose because it's listed among the recommended15 replies
KKinde
•Created by iamaman on 4/15/2024 in #💻┃support
How to validate an access token in Python?
What I don't really understand is why is there a getToken() but not verifyToken()
I think I will just mail support and if no solution tomorrow, then I will opt out using kinde especially for now.
My project would've been deployed by now if I sticked with firebase.
15 replies
KKinde
•Created by iamaman on 4/15/2024 in #💻┃support
How to validate an access token in Python?
Hello,
I have been stuck with this for about a week now.
I slept on the documentation also Kinde API but nothing seem to work.
Still trying to identify user via the acccess token before performing any task on the backend (Python).
Currently, i have this:
The doc isn't clear about this tho
but anyway, i recieve
Even if i refresh and get new access token.
I don't know what's up with it...maybe doing it wrong.
I have Also tried following another approach i saw on the doc under "Verifying JSON Web Tokens" but not working for me.
Any update?
15 replies