openiddict / openiddict-samples

.NET samples for OpenIddict

Home Page:https://documentation.openiddict.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider remove the AddCore() stuff on MAUI oidc

jingliancui opened this issue · comments

commented

Confirm you've already contributed to this project or that you sponsor it

  • I confirm I'm a sponsor or a contributor

Describe the solution you'd like

https://github.com/kevinchalet/openiddict-core/blob/maui_winui_sample/sandbox/OpenIddict.Sandbox.Maui.Client/MauiProgram.cs#L25C14-L25C21

May I get to know what is the purpose of why we should invoke addcore() on maui oidc sample?
I try to remove those code in sample but app will throw exception when it run.

Additional context

No response

.AddCore(...) registers the token manager and the token store that are necessary to track the state tokens produced by the client, store their payload in the DB and protect against replay attacks. You can theoretically disable token storage by calling options.DisableTokenStorage() in the client options, but doing so is absolutely not recommended as you'll end up with very large JWT state tokens that will be unusable with many HTTP servers (OpenIddict needs to store many things in the state tokens, so they end up being quite large).