LIFE
KKinde
•Created by LIFE on 5/8/2024 in #💻┃support
Unable to retrieve claims & identity from token
Thank you! Yeah it was
Microsoft.AspNetCore.Authentication.JwtBearer
which was causing the issue. Sorry to drag you in this, automatically assumed it was a kinde related problem.
Really appreciate the help16 replies
KKinde
•Created by LIFE on 5/8/2024 in #💻┃support
Unable to retrieve claims & identity from token
16 replies
KKinde
•Created by LIFE on 5/8/2024 in #💻┃support
Unable to retrieve claims & identity from token
could it be related to: https://stackoverflow.com/a/78063798/3712531
What should happen next is that your .NET API calls the discovery endpoint at the path .well-known/openid-configuration. Then the jwks_uri value is stored.And that the .NET API is unable to find the jwks?
16 replies
KKinde
•Created by LIFE on 5/8/2024 in #💻┃support
Unable to retrieve claims & identity from token
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1239843255479435348/image.png)
16 replies
KKinde
•Created by LIFE on 5/8/2024 in #💻┃support
Unable to retrieve claims & identity from token
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1239840291310145567/image.png)
16 replies
KKinde
•Created by LIFE on 5/8/2024 in #💻┃support
Unable to retrieve claims & identity from token
Not a problem :)
16 replies
KKinde
•Created by LIFE on 5/8/2024 in #💻┃support
Unable to retrieve claims & identity from token
I see, thanks for the update!
16 replies
KKinde
•Created by LIFE on 5/8/2024 in #💻┃support
Unable to retrieve claims & identity from token
yes, no hurry. Thank you Oli!
16 replies
KKinde
•Created by LIFE on 5/8/2024 in #💻┃support
Unable to retrieve claims & identity from token
i failed to mention that it currently works in production, but not locally. But it has worked locally too
16 replies
KKinde
•Created by LIFE on 3/23/2024 in #💻┃support
How to get organization name in React SDK
oops, my last message wasn't sent:
Figured it out, you have to customize your access_token
4 replies
KKinde
•Created by LIFE on 3/5/2024 in #💻┃support
error: getuser is not a function
tried both async and synchronous.
Regardless, i read up on this before proceeding: https://discord.com/channels/1070212618549219328/1204559393535037480/1204563090327343155
https://discord.com/channels/1070212618549219328/1204559393535037480/1204923021106749450
20 replies
KKinde
•Created by LIFE on 3/5/2024 in #💻┃support
error: getuser is not a function
Of course! I totally forgot about
Went to the docs and found
getUser()
...
Thanks for the help!20 replies
KKinde
•Created by LIFE on 12/18/2023 in #💻┃support
Automatically set token in header
That is great,
isLoading
was the missing key!
Appreciate the explanation of the authentication flow🫶5 replies
KKinde
•Created by LIFE on 12/6/2023 in #💻┃support
Resolving auth in back-end (.NET) with token retrieved from front-end (React)
was able to "solve" it with this, but i'm uncertain if there are better solutions to the problem:
GitHub Copilot: To authorize based on the "name" value in the "roles" claim, you would need to parse the claim value as JSON and check the "name" field. However, the built-in
RequireClaim
method doesn't support this kind of complex claim value checking.
You will need to create a custom IAuthorizationRequirement
and AuthorizationHandler
to handle this. Here's an example of how you can do it:
Then, you can add the requirement and handler to your services and use them in your policy:
This will create a policy named "admin" that requires the "roles" claim to have a "name" field with the value "admin".49 replies
KKinde
•Created by LIFE on 12/6/2023 in #💻┃support
Resolving auth in back-end (.NET) with token retrieved from front-end (React)
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1186009717743554720/bcfbe58b83e17d3d4abc87a31c9b4696.png)
49 replies
KKinde
•Created by LIFE on 12/6/2023 in #💻┃support
Resolving auth in back-end (.NET) with token retrieved from front-end (React)
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1182667237056852041/3c4a4b544f4cc5ac717bebac44e86cfc.png)
49 replies
KKinde
•Created by LIFE on 12/6/2023 in #💻┃support
Resolving auth in back-end (.NET) with token retrieved from front-end (React)
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1182599022364598342/a13ba4799880cabdf66161336743dc77.png)
49 replies
KKinde
•Created by LIFE on 12/6/2023 in #💻┃support
Resolving auth in back-end (.NET) with token retrieved from front-end (React)
Thought that was handled by kinde?
49 replies
KKinde
•Created by LIFE on 12/6/2023 in #💻┃support
Resolving auth in back-end (.NET) with token retrieved from front-end (React)
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1182595783191707739/image.png)
49 replies
KKinde
•Created by LIFE on 12/6/2023 in #💻┃support
Resolving auth in back-end (.NET) with token retrieved from front-end (React)
Seems like audience is empty in the token
49 replies