Starts in:
2 DAYS
2 HRS
16 MIN
3 SEC
Starts in:
2 D
2 H
16 M
3 S
Open Closed

URL Redirect Issue #6106


User avatar
0
viswajwalith created

ABP Framework version: v5.1.3 UI Type: MVC Database System: SQL Server / MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): yes Exception message and full stack trace: Steps to reproduce the issue:

We have using the Emailing functionality in our application and sending the URL link as part of the email, for most of the services the user is getting redirected after successful login but for emails from Abp forms and from specific service module it is just going to home page not redirecting to desired page. Any idea?

For an example We have two services Service A and Service B,

URL for Servica A is perfectly working https://test.com/ServiceA/MyObjectA/Edit/?id=506d357d-bb97-f086-713c-3a0e9c192693

where as URL for Service B is not working https://test.com/ServiceBMyObjectA/Edit/?id=d1268bec-b1ae-8397-c175-3a0e9c194353

Do we need to do any configurations for the same? Please advise.


14 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please share the logs.

    There is a RedirectAllowedUrls in the AppUrlOptions

    You can add your URL to it or override the IsRedirectAllowedUrl method of IAppUrlProvider.

  • User Avatar
    0
    viswajwalith created

    hi

    Please share the logs.

    There is a RedirectAllowedUrls in the AppUrlOptions

    You can add your URL to it or override the IsRedirectAllowedUrl method of IAppUrlProvider.

    I think there is small miss communication, when users are clicking on the application URL link, they are able to login and navihate to the application.

    but our requirement is redirect to Specific Module specific URL after successful login. In our case this is perfectly working for Service A but not behaving same for Service B and ABP. Forms module.

    In case of service B, the user is able to login and just landed to Default/Home page not the module sepcific page https://test.com/ServiceBMyObjectA/Edit/?id=d1268bec-b1ae-8397-c175-3a0e9c194353

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I do not understand it very well. Can you share some screenshots, code and logs? Thanks

  • User Avatar
    0
    viswajwalith created

    hi

    I do not understand it very well. Can you share some screenshots, code and logs? Thanks

    Is it possible to have a screenshare session ?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please share some info first. Then we can join a zoom meeting.

  • User Avatar
    0
    viswajwalith created

    hi

    Please share some info first. Then we can join a zoom meeting.

    ok, will send

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks

  • User Avatar
    0
    viswajwalith created

    Thanks

    shared the screen recording to ur email malimings@gmail.com

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please share the full logs.txt of your video, I guess the return url has wrong.

    liming.ma@volosoft.com

    Thanks

  • User Avatar
    0
    viswajwalith created

    hi

    Please share the full logs.txt of your video, I guess the return url has wrong.

    liming.ma@volosoft.com

    Thanks

    Sent a logs to ur email, let me know if anything is needed more on this

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    It seems the logs don't contain authserver website.

    Can you share the logs of all website? Thanks

    Also set the level to Debug will be best.

    public async static Task<int> Main(string[] args)
    {
        Log.Logger = new LoggerConfiguration()
            .MinimumLevel.Debug()
            .Enrich.FromLogContext()
            .WriteTo.Async(c => c.File("Logs/logs.txt"))
            .WriteTo.Async(c => c.Console())
            .CreateLogger();
    
  • User Avatar
    0
    viswajwalith created

    hi

    It seems the logs don't contain authserver website.

    Can you share the logs of all website? Thanks

    Also set the level to Debug will be best.

    public async static Task<int> Main(string[] args) 
    { 
        Log.Logger = new LoggerConfiguration() 
            .MinimumLevel.Debug() 
            .Enrich.FromLogContext() 
            .WriteTo.Async(c => c.File("Logs/logs.txt")) 
            .WriteTo.Async(c => c.Console()) 
            .CreateLogger(); 
    

    for this we had to deploy the code, will share that tomorrow

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can share the logs of authserver now without set level.

  • User Avatar
    0
    viswajwalith created

    hi

    You can share the logs of authserver now without set level.

    You can close this ticket, We found the issue, we missed adding options.Conventions.AuthorizePage("/XXXXService/XXXXManagements/Edit/Index", XXXXServicePermissions.XXXXManagements.Default); after adding so it worked fine.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06