-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
Using the Velusia.Client sample the id_token and access_token are null and the @User.Identity.Name is null as well in the index.cshtml #1962
Comments
Hey,
That's because the OpenIddict client maps Since it's not a claim that is always added by identity providers, I also opened #1963 to update the client stack to fall back to the OIDC
It's expected, OpenIddict doesn't use these constants. To retrieve the access token, use either:
Same logic for the identity token. Hope it'll help. |
Thank you so much for your response ! That clears up the confusion I had |
It looks like in Velusia the FrontchannelAccessToken and FrontchannelIdentityToken are null but the backchannel tokens are populated. Is that configured somewhere in the client to not send the FrontChannel tokens ? Thanks again for all your help. I pulled down your changes this morning and the identity name is being populated perfectly now |
Glad I could help 😄
It's expected: this sample uses the authorization code flow, in which all the tokens are returned by the token endpoint. As I mentioned, the frontchannel tokens are only available when using the implicit or hybrid flows with |
Ohhhh ok I gotcha ! From what I understand the backchannel and authorization code flow is more popular anyways so this is perfect. Thanks ! |
Yep! When negotiating the If you're interested in the gnarly details, you can find the (complex) logic here, with a few comments indicating why some flows are preferred to others: openiddict-core/src/OpenIddict.Client/OpenIddictClientHandlers.cs Lines 4354 to 4544 in b386b78
|
Closing as I believe I addressed all your concerns, but feel free to reopen if you have additional questions 😃 |
Confirm you've already contributed to this project or that you sponsor it
Version
5.1.0
Question
I am using the Velusia example to play around with setting up a test client and authorization server.
With the Velusia.Client it is coming back as authorized and there are some claims there but in the index.cshtml
@User.Identity.Name is null
and so is
@await Context.GetTokenAsync("access_token")
and
@await Context.GetTokenAsync("id_token")
Any idea why there are a handful of claims but these values are null ?
The text was updated successfully, but these errors were encountered: