Open Closed

Facing Authorization issues after azure devops deployment. #6255


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

We are facing authorization issues in the development environment as well as after deployment on Azuredevops.

  1. At local we are able to run the Blazer web application with login correctly, but if we try to check the API's from Swagger then it is authorized successfully but API execution gives an unauthorized 401 error.

  2. The AzureWeb application is working fine without authorization, But while trying to log in to the application it comes with the error "This page isn’t working". Please find screenshots also.

Please find below the table values OpenIddictApplications, In the same way, we have replaced only localhost urls with our live application and API urls.

Please suggest if we are missing something.

Thanks Jayesh


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

    hi

    Do you have the below code?

    https://github.com/abpframework/abp/blob/dev/modules/openiddict/app/OpenIddict.Demo.Server/OpenIddictServerModule.cs#L126

    https://github.com/abpframework/abp/blob/dev/modules/openiddict/app/OpenIddict.Demo.Server/EntityFrameworkCore/ServerDataSeedContributor.cs#L41

  • User Avatar
    0
    jayesh@extranerds.com created

    We have the below projects in the list in our solution explorer.

    Can you please share more details to fix the issue?

    Currently, I'm able to see the code like in the screenshot, but not exactly as in ServerDataSeedContributor. Here we have defined "Resources" as well.

    Thanks Jayesh

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Did you selected the scope option on swagger?

  • User Avatar
    0
    jayesh@extranerds.com created

    After selecting the scopes, it's working fine in the localhost development environment. Now everything is fine in our local environment (web+API).

    The AzureWeb application is working fine without authorization, But while trying to log in to the application it comes with the error "This page isn’t working". Please find screenshots also.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please check the logs.txt for HTTP 500 error

  • User Avatar
    0
    jayesh@extranerds.com created

    Hey,

    We have seen 500 in the log file at the below places:

    Please verify the logs below if necessary. Also please confirm if we are missing something.

    Thanks Jayesh

  • User Avatar
    1
    maliming created
    Support Team Fullstack Developer

    hi

    You can run abp install-libs command to create libsfor azure devops deployment

  • User Avatar
    0
    jayesh@extranerds.com created

    Do we need to run this command before building the project or after building it, please confirm

  • User Avatar
    0
    jayesh@extranerds.com created

    Hi,

    That solves the issue of redirect URL , But now once the user login to the website menu all menu are not loaded in left pane

    and once I do hard refresh then all menu loads

    Please let me know if there is any setting that i can set to load all the menu at once

    Thanks, Jayesh

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Do we need to run this command before building the project or after building it, please confirm

    The install-libs command will create the js and CSS files. These files are needed for project, You should copy the wwwroot when publishing the website.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    That solves the issue of redirect URL , But now once the user login to the website menu all menu are not loaded in left pane

    What is your lepton package version?

    Please try to upgrade it to the latest.

    You can create new template project to check the package version.

  • User Avatar
    0
    jayesh@extranerds.com created

    above is my current version of lepton theme

    Can you please let me know the process of how to update the theme package. I tried "Abp update " command but it updated the complete project and as currently my project is in .NET core 7 I got around 112 error.

    please suggest

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you try to use the 2.4.3 as the lepton version.

  • User Avatar
    0
    jayesh@extranerds.com created

    Getting error :-

    Please let me know what needs to change.

    Thanks, Jayesh

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please upgrade the Blazorise and Microsoft.AspNetCore.Components.WebAssembly packages based on the errors.

    Remember to run abp bundle command on blazor project to update the js and css.

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