Open Closed

Replacing default Login (Razor Pages) to Angular in AuthServer #5630


User avatar
0
saad.aldulaijan created
  • ABP Framework version: v7.3.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I want to achieve the following:

I have multiple apps connected to one AuthServer, this AuthServer has nothing customized at all.

I want to replace the default login/registration pages (razor pages) to be one angular app for all clients.

Is that possible? if it is, how can i do it?


6 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello saad.aldulaijan,

    could you please check following links - https://support.abp.io/QA/Questions/446/How-do-I-customize-login-pages-for-Angular-when-using-new-Authorization-Work-Flow-in-version-31 https://support.abp.io/QA/Questions/2582/Replacement-of-Login-Page-in-angular-is-not-working--i-have-follow-the-replacement-documentation-after-replacement-still-the-page-is-redirect-to-Backend-login-page let me know if it helps you.

  • User Avatar
    0
    saad.aldulaijan created

    Hello saad.aldulaijan,

    could you please check following links - https://support.abp.io/QA/Questions/446/How-do-I-customize-login-pages-for-Angular-when-using-new-Authorization-Work-Flow-in-version-31 https://support.abp.io/QA/Questions/2582/Replacement-of-Login-Page-in-angular-is-not-working--i-have-follow-the-replacement-documentation-after-replacement-still-the-page-is-redirect-to-Backend-login-page let me know if it helps you.

    I have already read those, not suitable for my case.

    Let me show you an example: Currently: System A: (api, angular) http://localhost:4200 System B: (api, angular) http://locallost:4300 AuthServer (razor pages only) https://localhost:44322

    System A wants to login --> redirected to razor page on AuthServer. https://localhost:44322/account/login System B wants to login --> redirected to razor page on AuthServer. https://localhost:44322/account/login

    To be: I want to replace those razor pages by angular to be as follows: Stystem A wants to login --> should be redirected to angular app http://angularapp:4400/account/login Stystem B wants to login --> should be redirected to angular app http://angularapp:4400/account/login

    Workaround: When I try Resource Owner Password Flow, it does not work. it redirects to its own login page, like this: System A wants to login --> redirected to http://localhost:4200/account/login System B wants to login --> redirected to http://localhost:4300/account/login

    Hope you got my point.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Thanks for your response, will check and get back to you asap.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi

    To be: I want to replace those razor pages by angular to be as follows: Stystem A wants to login --> should be redirected to angular app http://angularapp:4400/account/login Stystem B wants to login --> should be redirected to angular app http://angularapp:4400/account/login

    the above implementation is not part of abp currently provides:

    Authorization Code Flow and Resource Owner Password Flow

    but it is possible to achieve you can use Resource Owner Password Flow by create a new angular app and use this library https://www.npmjs.com/package/angular-oauth2-oidc.

    please see how abp has done it

    https://github.com/abpframework/abp/blob/139d0c83f20717af814f9ce5e0cea26886bb29cd/npm/ng-packs/packages/oauth/src/lib/strategies/auth-password-flow-strategy.ts

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello saad.aldulaijan,

    Please do let us know if this solution has worked for you?

    Awaiting for your response.

    Thank You, Anjali

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello saad.aldulaijan,

    Hope you doing well.

    Can we close this ticket if your query is resolved? Please confirm.

    Awaiting for your valuable response.

    Thank You, Anjali

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11