Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add getIdToken method #57

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Add getIdToken method #57

merged 1 commit into from
Jan 22, 2024

Conversation

mchr3k
Copy link
Contributor

@mchr3k mchr3k commented Nov 29, 2023

Explain your changes

I've raised a support thread in Discord: https://discord.com/channels/1070212618549219328/1179456563627438141

[...]can you help me understand how to use and validate the ID Token (https://kinde.com/docs/build/about-id-tokens/) ? I'm already passing the Access Token to my REST API through the "authorization" HTTP header. However, this token doesn't contain the user's email address (https://kinde.com/docs/build/about-access-tokens/) and so on every REST API call I'm currently getting a M2M token and calling the Kinde API to get the user object to get their email address. The ID token includes the user's email address (https://kinde.com/docs/build/about-id-tokens/) but I can't see any example in your docs of the recommended way of passing this token through to a REST API and validate serverside that the ID token is valid.

This PR exposes a new getIdToken() method which returns the complete ID Token: https://kinde.com/docs/build/about-id-tokens/

Checklist

🛟 If you need help, consider asking for advice over in the Kinde community.

@DaveOrDead
Copy link
Member

Hey @mchr3k thanks for this :)

Just checking if this PR is still needed or did the additional claims feature solve your use case?

@DaveOrDead DaveOrDead merged commit bde5141 into kinde-oss:main Jan 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants