Activities of "maliming"

Great

We will add an option inthe tenant side to enable/disable it in the next version.

ok

hi

  1. Customer A tenant wants to enable only Okta
  2. Customer B tenant wants to enable Google and Microsoft
  3. Customer C tenant does not want to enable any external providers

You can override the AuthenticationSchemeProvider to remove external login based on the current tenant.

using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.Options;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;

namespace Volo.Abp.Account.Public.Web;

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IAuthenticationSchemeProvider))]
public class MyAuthenticationSchemeProvider : AuthenticationSchemeProvider, ISingletonDependency
{
    private readonly ICurrentTenant _currentTenant;

    public MyAuthenticationSchemeProvider([NotNull] [ItemNotNull] IOptions<AuthenticationOptions> options, ICurrentTenant currentTenant)
        : base(options)
    {
        _currentTenant = currentTenant;
    }

    protected MyAuthenticationSchemeProvider([NotNull] [ItemNotNull] IOptions<AuthenticationOptions> options, [NotNull] IDictionary<string, AuthenticationScheme> schemes, ICurrentTenant currentTenant)
        : base(options, schemes)
    {
        _currentTenant = currentTenant;
    }

    public override async Task<IEnumerable<AuthenticationScheme>> GetAllSchemesAsync()
    {
        var schemes = (await base.GetAllSchemesAsync()).ToList();
        if (_currentTenant.Name == "TenantA")
        {
            schemes.RemoveAll(x => x.Name == "AzureOpenId");
        }

        if (_currentTenant.Name == "TenantB")
        {
            schemes.RemoveAll(x => x.Name == "AzureOpenId");
            schemes.RemoveAll(x => x.Name == "Google");
        }

        return schemes;
    }
}

Yes.

hi

The host is empty only the tenant has values.

Clone https://github.com/maliming/NextGenPortal/ change connection string migrate database login admin change the azure configuration create a new tenant change your tenant azure configuration in a tenant.

Test your steps.

Can you test your configuration in my project? So I can get the same exception.

hi

How can I reproduce this exception with https://github.com/maliming/NextGenPortal/ ?

Please share the steps. Thanks.

hi

https://github.com/maliming/NextGenPortal/commit/77bc8a49da2a9f5bc60b16a50c186449b1131e98

Showing 2491 to 2500 of 11531 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 17, 2025, 07:08
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.