From November 21
to December 02
99Days : 99Hrs : 99Min : 99Sec
Also valid for the
existing customers!
Open Closed

Single sign on with Razor and angular #833

thanhvl1 created

Check the docs before asking a question: Check the samples, to see the basic tasks: The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v3.3.1
  • UI type: Angular , MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Seperated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue: I have 2 page one is angular and another is razor First i go to page in angular to login It's login succes and redirect to my home page i created in IdentityServer web with razor but when i click buton to go to page in angular, my page in angular is not login

How can I log into the razor site in IdentityServer and press the button it points to the angular page that is already logged in?

5 Answer(s)
  • 0
    maliming created
    Support Team

    hi @[email protected]

    How do we reproduce the problem?

  • 0
    thanhvl1 created
    • I created HomePage.cshtml in IdentityWeb.
    • I added redirectUri in enviroment.ts (Angular) to after login i can go to HomePage.cshtml
    • From my angular site i click login
    • When I login success i click button report to go to my angular site. My code is: <a href="https://localhost:4200" style="color:white; font-family:SourceSansPro-Bold" class="button">REPORT </a> but when it redirect to angular site. It not login
  • 0
    Mehmet created
    Support Team


    After successfully logging in, IdentityServer redirects to the Angular application with query parameters such as:


    The angular-oauth2-oidc package installed in Angular UI use these query params to get access token by performing an HTTP call to the IdentityServer.

    If you redirect to Angular without the query params, the app cannot get an access token.

  • 0
    thanhvl1 created

    Hi Mehmet How i can get query parameters on razor page after login?

  • 0
    maliming created
    Support Team

    hi thanhvl1

    You can't be automatically redirected to a specific page after successful login in Angular.