Ends in:
1 DAY
10 HRS
3 MIN
30 SEC
Ends in:
1 D
10 H
3 M
30 S
Open Closed

Custom Redirection to third-party IdP Login Page and Dashboard Post-Authentication in ABP.IO #7788


User avatar
0
Repunjay_TASC created
  • ABP Framework version: 8.0
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Objective: To bypass the ABP.IO login page and redirect users directly to the IdP’s login page, and after successful authentication, redirect them to application’s dashboard.

Description :- I have integrated OpenIdConnect with a third-party Identity Provider (IdP) in a new ABP.IO template project, and it is working as expected. However, we have a requirement where, when a client clicks on our application logo (which is already configured within their application), they should be redirected directly to the IdP's login page instead of the ABP.IO login page. After authentication with the IdP, the user should be redirected to our dashboard.

I need assistance how to handle routing and above scenario in abp.io template.

<br> I don't want to show below screen for OpenIdConnect login user.


47 Answer(s)
  • User Avatar
    0
    Repunjay_TASC created

    pls try now

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    First move OIDCController from HttpApi.Host to Authserver

    then remove CallbackPath from appsettings and the AddOpenIdConnect method.

    remove Authorize from OIDCController

    Use api/oidc/login method instead of authorize.

    Update your logo href link to <AuthServerURL>api/oidc/login

  • User Avatar
    0
    Repunjay_TASC created

    First move OIDCController from HttpApi.Host to Authserver I will do first point

    then remove CallbackPath from appsettings and the AddOpenIdConnect method.

    CallbackPath it's mandatory for if AddOpenIdConnect, if i remove this then by default read "/sigin-oidc" path and then facing call back URLpath. we can't remove because it's mandatory.

    remove Authorize from OIDCController

    One of ABP ticket i have seen we can handle multiple schema like below code, then you can used Authorize for controller. Note:- it's working this means if i access specific URL endpoint able to access doesn't cause issue Authorize .

    Use api/oidc/login method instead of authorize.

    Update your logo href link to <AuthServerURL>api/oidc/login

    I have same requirement like this ticket . https://abp.io/support/questions/5493/How-do-I-generate-the-Auth-url-that-will-allow-a-non-ABP-related-website-authenticate-with-ABP-OpenIddict. instead of authorize method i used below method to initial OIDC flow. I was able to log in successfully, but after the login, I need to redirect to the Angular dashboard. However, after being redirected, the dashboard is displaying the following screen.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    CallbackPath it's mandatory for if AddOpenIdConnect, if i remove this then by default read "/sigin-oidc" path and then facing call back URLpath. we can't remove because it's mandatory.

    You should keep /sigin-oidc path, and then OIDC Handler will continue to handle callbacks

    One of ABP ticket i have seen we can handle multiple schema like below code, then you can used Authorize for controller. Note:- it's working this means if i access specific URL endpoint able to access doesn't cause issue Authorize .

    This Controller is used to initial the oidc flow

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Please update the redirect_uri, i will check it.

  • User Avatar
    0
    Repunjay_TASC created

    update pls check. and pls clear cheche as well

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    still get wrong

  • User Avatar
    0
    Repunjay_TASC created

    what is issue ? However, ** "/signin-oidc"** method exist in application after authenticated response redirected this endpoint

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

  • User Avatar
    0
    Repunjay_TASC created

    what is issue ? However, ** "/signin-oidc"** method exist in application after authenticated response redirected this endpoint

    ?

  • User Avatar
    0
    Repunjay_TASC created

    If we can't add any call back URL in below AddOpenIdConnect configuration then by default redirect this end point "/signin-oidc"

  • User Avatar
    0
    Repunjay_TASC created

    We are currently facing an unresolved issue with client authentication that has been escalating internally. This problem is impacting our productivity and is also affecting our client, who is waiting for a resolution.

    Given the urgency and complexity of the situation, I believe scheduling a meeting would be beneficial. This will allow us to discuss the issue in detail and work towards a swift resolution.

    Could you please arrange a meeting at your earliest convenience? Your assistance in this matter would be greatly appreciated

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi

    However, ** "/signin-oidc"** method exist in application after authenticated response redirected this endpoint

    Could you please arrange a meeting at your earliest convenience? Your assistance in this matter would be greatly appreciated

    I don't think a meeting will help.

    please configure the /signin-oidc callback path in the auth0, i will check it then

  • User Avatar
    0
    Repunjay_TASC created

    it's already updated

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    should be signin-oidc not sigin-oidc

  • User Avatar
    0
    Repunjay_TASC created

    ohhh, pls check now .

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    it work as expected

  • User Avatar
    0
    Repunjay_TASC created

    Thanks great, did you make any changes angular or api side ? please let me know i will follow the same steps.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    First move OIDCController from HttpApi.Host to Authserver

    then remove CallbackPath from appsettings and the AddOpenIdConnect method.

    remove Authorize from OIDCController

    Use api/oidc/login method instead of authorize.

    Update your logo href link to <AuthServerURL>api/oidc/login

  • User Avatar
    0
    Repunjay_TASC created

    First move OIDCController from HttpApi.Host to Authserver

    then remove CallbackPath from appsettings and the AddOpenIdConnect method.

    remove Authorize from OIDCController

    Use api/oidc/login method instead of authorize.

    Update your logo href link to <AuthServerURL>api/oidc/login

    sure can you pls share working project as well this email id nilesh.nyahal@tasconnect.com

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    shared

  • User Avatar
    0
    Repunjay_TASC created

    Thanks

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