タグ付けされた質問 「saaskit」

3
asp.netコア3.1のテナントに基づく認証スキームを登録する
現在、デフォルトのクライアントIDとシークレットを備えた外部ログインプロバイダーを備えたIdentity Server 4 Webアプリケーションを作成しています。しかし、私の目標は、テナントに基づいてAzure、Google、Facebookなどの認証プロバイダーを登録することです。 私はSaasKitマルチテナンシーアセンブリを使用しましたが、ここではapp.usepertenant()ミドルウェアを試しました。ただし、UseGoogleAuthentication()メソッドは廃止されたため、このusepertenantミドルウェアを使用してマルチテナント認証を実現できませんでした。 現在のコード、 services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme) .AddMicrosoftAccount(option => { option.ClientId = "clientid"; option.ClientSecret = "clientsecret"; option.SaveTokens = true; }); 期待されるコードは以下のようです、 var authentication = services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme); if (tenant.hasMicrosoft) { authentication.AddMicrosoftAccount(option => { option.ClientId = "clientid"; option.ClientSecret = "clientsecret"; option.SaveTokens = true; }); } if (tenant.hasGoogle) { authentication.AddGoogle(option => { option.ClientId = …
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.