Coder Social home page Coder Social logo

Comments (3)

martincostello avatar martincostello commented on June 30, 2024

I'm not aware of a way to achieve dynamic registration of any authentication provider out of the box, as providers need to be registered when the application starts up.

You could do it on startup if every custom tenant is known through adding every possible tenant as a different scheme, but that won't be scalable.

What you probably need to do is have a custom scheme and handler that selects the values from your database at runtime. You could maybe do that by inheriting from our provider and then adding that behaviour dynamically, but you'll have to investigate for yourself.

This isn't something we'd support ourselves.

from aspnet.security.oauth.providers.

stonesvillage avatar stonesvillage commented on June 30, 2024

Maybe something like Finbuckle Multitenant would help you out without the need of registering multiple schemes.
It supports ”per tenant authentication”.
https://www.finbuckle.com/MultiTenant/Docs/v6.12.0/Authentication

from aspnet.security.oauth.providers.

courtzzz avatar courtzzz commented on June 30, 2024

Thanks @martincostello @stonesvillage for quick assistance

For anyone coming along here looking for an answer, I eventually had to pull down the repo and then create my own installation. Its very rudimentary right now but the idea is that I intercept the "Challenge" request and then substitute the correct Okta tenant in based on the login email filled in by the client.

So I overrode the following method:

protected override async Task HandleChallengeAsync(AuthenticationProperties properties)

image

And pass the email through with the AuthenticationProperties

image

Im using IdentityServer4

from aspnet.security.oauth.providers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.