Retrieve user data from access token
I have access token which is generated by react SDK.
My backend is implemented in python. I'm planning to use jwt based authentication but I couldn't find way to retrieve user data from access token which is generated by react SDK.
Any way to retrieve user data from access token?
Also I want to know a way to retrieve access token for connected apps under my situation.
Sample
Frontend:
Backend(python, fastapi)
3 Replies
Hi @dig5549 ,
Thank you for reaching out. I understand that you're trying to retrieve user data from an access token generated by the React SDK and you’re implementing JWT-based authentication in your Python FastAPI backend.
It seems that you're looking for a way to decode the access token and retrieve user details.
Let me have a look at this in more detail. I'll get back to you as soon as I can with more specific guidance. In the meantime, if you have any additional questions, feel free to share.
Best regards,
Ages
Yes, that's what i want to ask.
I have conducted additional research on this.
From my research, I understand that the python sdk only allows user data to be retrieved at the time the callback is processed on the backend.
As an alternative, it is possible to retrieve user data from the frontend api
https://docs.kinde.com/kinde-apis/frontend/#tag/oauth/get/oauth2/v2/user_profile
Please let me know if my understanding is correct.
If it is, it would be great if the python sdk can also retrieve user data from the user's access token.
As a more urgent request, I would like to ask you to check this one.
https://discord.com/channels/1070212618549219328/1317584602230947931/1317584602230947931
@Ages
Kinde docs
Kinde Frontend API
The frontend API is for managing the currently signed-in user. It includes getting their profile and revoking tokens
Hi @dig5549 ,
Your understanding is correct—the Python SDK primarily retrieves user data at the time of callback processing on the backend. For user data retrieval via the frontend, using the endpoint you referenced is indeed a valid approach: Frontend API - User Profile.
Regarding your suggestion to extend the Python SDK functionality to retrieve user data from an access token, I’ll pass this feedback along to our team for consideration.
To keep our conversation organized, I kindly request that we consolidate all further discussions in the thread you mentioned here: Support Thread. This will help us address your questions more efficiently.
Please feel free to reach out there, and I’ll ensure we continue assisting you promptly.
Best regards,
Ages
Kinde docs
Kinde Frontend API
The frontend API is for managing the currently signed-in user. It includes getting their profile and revoking tokens