Ends in:
1 DAY
23 HRS
47 MIN
37 SEC
Ends in:
1 D
23 H
47 M
37 S
Open Closed

Login from Angular or MVC or Blazor without redirects #804


User avatar
0
pvaz created
  • ABP Framework version: v4.1.0
  • UI type: Angular / MVC / Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hi,

how can I make the login without using the redirect url and login from another port or identity server ?

When using Angular or MVC or Blazor version I want to be able to do login and enter the application without redirecting to a login service that will then redirect me to the homepage.

I need to have a personalized login for each tenant and not the same login for each application.

How can this be achieved ?

Paulo


5 Answer(s)
  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    Hello @pvaz,

    When using Angular or MVC or Blazor version I want to be able to do login and enter the application without redirecting to a login service that will then redirect me to the homepage.

    This is Single-Sign-On redirecting back to your application. You have a client side application, you need to authenticate and validate your token to some authentication server. It can be either your own backend with AuthServer (non-tiered applications) or a different host (tiered applications).

    I need to have a personalized login for each tenant and not the same login for each application.

    Tenant's admin can change the layout settings but it needs to be the same end point. You can check Multi-Tenancy Domain/Subdomain Tenant Resolver to resolve the tenant and change the layout depending on it. You can also check this article about how to modify login page.

  • User Avatar
    0
    pvaz created

    Hello @gterdem,

    I understand your explanation, but what I don't understand is why the login is independent or can be included as option like in Asp.Net Zero.

    The identification should be possible to do within the angular or mvc or blazor project on my idea.

    I know that we need to authenticate and validate the token to be able to use the services, but why not be able to do this inside the client project and needed to make this authentication thru another application and then return to prior page or redirect to another ?

    Thanks, Paulo

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    I understand your explanation, but what I don't understand is why the login is independent or can be included as option like in Asp.Net Zero.

    Asp.Net Zero is monolith application base while ABP is modular. Account module is hosting the code base for login and signin logic.

    I know that we need to authenticate and validate the token to be able to use the services, but why not be able to do this inside the client project and needed to make this authentication thru another application and then return to prior page or redirect to another ?

    I think what you mean is why we're not using resource owner password flow which allows us hosting our own login page on client side? We had this behaviour however this is not secure and not a good practice. And authorization is not (should not) be mend by your application needs.

    You might also want to check these links; Scott Brady blog post, Fact sheet post SO question

  • User Avatar
    0
    pvaz created

    Hi @gterdem,

    thank you for your help and reply but I still did not manage how to bypass the need to choose the tenant but not using the domain resolver.

    In the login page, how can I hide the tenant selector ? On the customization of the login, there is nothing related with the tentant selector but it is shown.

    Another thing, how can I use a combination like this: http://localhost:12345/Account/Login?tenantid=1

    This way in the url I could define the tentant I wanted to use on the login.

    I need to have a customized login for each tenant, with diferent layout based on the tenant that was previously passed on the url, and that the tenant selector is hidden from user.

    This was a great help if you can manage to prepare me an example.

    Thanks

  • User Avatar
    0
    edelivery created

    Hi pvaz

    In the login page, how can I hide the tenant selector ? On the customization of the login, there is nothing related with the tentant selector but it is shown

    You can set this:

                Configure<AbpMultiTenancyOptions>(options =>
                {
                    options.IsEnabled = false;
                });
    

    in IdentityServerModule to hide tenant selector

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35