Blazor Web组件通过隐式流连接到OAuth

Blazor Web组件通过隐式流连接到OAuth,oauth,blazor,webassembly,blazor-webassembly,implicit-flow,Oauth,Blazor,Webassembly,Blazor Webassembly,Implicit Flow,在我的BlazorWeb组装项目中,我必须连接到一个不实现OIDC的web API 我在aspnetcore github上读到,他们选择只实现OIDC连接 我想我必须编写一个RemoteAuthenticationService的自定义实现,并通过builder.Services.AddRemoteAuthentication方法添加它,但我不知道如何做到这一点。 阅读RemoteAuthenticationService的当前实现没有帮助 连接Web API唯一需要做的就是调用以下URI:

在我的BlazorWeb组装项目中,我必须连接到一个不实现OIDC的web API

我在aspnetcore github上读到,他们选择只实现OIDC连接

我想我必须编写一个
RemoteAuthenticationService
的自定义实现,并通过
builder.Services.AddRemoteAuthentication
方法添加它,但我不知道如何做到这一点。 阅读
RemoteAuthenticationService
的当前实现没有帮助

连接Web API唯一需要做的就是调用以下URI:

https://<webapi>/oauth/Authorize?client_id=<MyClientId>&state=<State>&scope=read&response_type=token&redirect_uri=<RedirectUri>
https:///oauth/Authorize?client_id=&state=&scope=read&response_type=token&redirect_uri=
用户填写表单并通过重定向URI在我的blazor应用程序中重定向,url参数中包含accessToken

然后,我必须在所有Web API请求的头中添加accessToken,但我通过
AuthorizationMessageHandler
找到了如何做到这一点


如何使用Blazor Web Assembly实现此流程?我的搜索方向是否错误?

我正在尝试做同样的事情-Blazor WebAssembly应用程序通过隐式或授权代码授权针对现有OAuth服务器。你找到解决办法了吗?