# Interacting with Solid via OpenID Connect using Microsoft .NET Frameworks

**URL:** <https://forum.solidproject.org/t/interacting-with-solid-via-openid-connect-using-microsoft-net-frameworks/5684>\
**Category:** General Discussion\
**Created:** [September 30, 2022, 6:37pm UTC](https://forum.solidproject.org/t/interacting-with-solid-via-openid-connect-using-microsoft-net-frameworks/5684 "2022-09-30T18:37:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kidehen](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/kidehen/32/42_2.png) [@kidehen](https://forum.solidproject.org/u/kidehen)\
**Post date:** [September 30, 2022, 6:37pm UTC](https://forum.solidproject.org/t/interacting-with-solid-via-openid-connect-using-microsoft-net-frameworks/5684/1 "2022-09-30T18:37:43Z")

</div>

We’ve recently published a new [Github Repo](https://github.com/OpenLinkSoftware/Virtuoso.NET) comprising the entire source code for a Microsoft .NET app that authenticates against Solid Pods using OpenID Connect.

Goto [Rep Page](https://github.com/OpenLinkSoftware/Virtuoso.NET) for the code.

Enjoy!

---

<div class="post-metadata">

**Author:** ![ThisIsMissEm](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/thisismissem/32/3166_2.png) [@ThisIsMissEm](https://forum.solidproject.org/u/ThisIsMissEm)\
**Post date:** [September 30, 2022, 7:31pm UTC](https://forum.solidproject.org/t/interacting-with-solid-via-openid-connect-using-microsoft-net-frameworks/5684/2 "2022-09-30T19:31:45Z")

</div>

For the method: RegisterAppAsync — I’d encourage you to use a JSON builder instead of just building it as a string.

We also have an alpha service at Inrupt for validating the public client identifier documents, it should be released more publicly soon.

We also highly recommend making the clientName property configurable/set, as this is displayed to your users as part of the OIDC flow.

Also, we’ve started to recommend a content-type of application/ld+json, instead of just application/json, and you’re missing the JSONLD context for this document (which can cause some issues)

---

<div class="post-metadata">

**Author:** ![ThisIsMissEm](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/thisismissem/32/3166_2.png) [@ThisIsMissEm](https://forum.solidproject.org/u/ThisIsMissEm)\
**Post date:** [September 30, 2022, 7:34pm UTC](https://forum.solidproject.org/t/interacting-with-solid-via-openid-connect-using-microsoft-net-frameworks/5684/3 "2022-09-30T19:34:55Z")

</div>

Oh! Actually, I just noticed you’re using static client registration rather than client identifier documents.

---

<div class="post-metadata">

**Author:** ![ThisIsMissEm](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/thisismissem/32/3166_2.png) [@ThisIsMissEm](https://forum.solidproject.org/u/ThisIsMissEm)\
**Post date:** [September 30, 2022, 7:40pm UTC](https://forum.solidproject.org/t/interacting-with-solid-via-openid-connect-using-microsoft-net-frameworks/5684/4 "2022-09-30T19:40:47Z")

</div>

Small HTML tip: for Button elements, they can have a value, so you can have just one javascript event handler for all buttons, which just reads the event target’s value, rather than having N separate event handlers; though I’m not sure how razor would work with that (I don’t know .Net)

Also, you shouldn’t be sending “credentials: include” with requests, as this would leak your servers’ cookies to unknown external hosts (pod providers) — just send with the DPoP header + Access Token in the authorization header, those aren’t influenced by the credentials option (at least in javascript)
