Questions tagged «saaskit»

3
在asp.net core 3.1中基于租户的注册身份验证方案
当前,我已经使用外部登录提供程序创建了Identity Server 4 Web应用程序,该应用程序具有默认客户端ID和机密。但是我的目标是基于租户注册身份验证提供程序,例如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 = …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.