Activities of "ianbaddock"

Question

I purchased a new license on 22nd November but didn't get the Black Friday discount. Could you help please?

  • ABP Framework version: vX.X.X
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no, not tiered
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I am currently trying authenticate users in my ABP solution using Xero as the identity server. https://www.xero.com/au/

Their developer docs lists the following guide:

https://github.com/XeroAPI/xero-netstandard-oauth2-samples/blob/master/XeroOAuth2Sample/README.md

When I startup my application, it has the OpenIdConnect button. I click the button and am taken to the Xero login screen when I click the authorise button. I am taken back to my application into the following code:

After the code runs, it just returns back to the login screen. My assumption would be that it would either log the user in, if the external logon user exists, OR go to a register page to create the new user.

ConfigureAuth now looks like this:

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.3.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

I am creating a ABP commercial solution with its own set of data tables which are all generated using ABP suite. I have a use case where I also need to connect to another systems database to read and update its data. This other system is an older style .NET solution with its own data migrations etc. What would be the best way to include data from that system in my ABP solution.

As an example, if I create a record in one of my ABP solution tables, I would like to add a similar row in the other systems database.

Is it possible to implement this functionality by creating another dbcontext attached to the other database and someone disable any migrations and then query the other databases tables like that?

hi You can try to generate a DbContext and use it. https://docs.microsoft.com/en-us/ef/core/cli/dotnet#dotnet-ef-dbcontext-scaffold https://www.learnentityframeworkcore.com/walkthroughs/existing-database

Just to clarify, this would NOT be an AbpDbContext?

  • ABP Framework version: v5.3.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

I have created an ABP solution which has a single entity in at the moment. I have enable authorization for the API as per the following document: https://docs.abp.io/en/abp/latest/API/Swagger-Integration

The issue however is that you would expect that if you try to hit a secure endpoint it would response with a 401. At the moment, it is responding with the login page as per the image below:

Yes, Because this is not a database created by AbpDbContext.

You can give it a try. Just use a normal ef core dbcontext.

perfect, thanks mate

I guess you want to send requests via Postman, not via Swagger. That's why you need to get the token first and then make a request with that token.

Hi

I think you missed my point. The API is secured and it should return a 401 if we try to access and endpoint without the token, it should not return a 200 with the login page html (from swagger OR from postman)

this is an older version of ABP which does return the 401 as expected.

Thank you for your detailed explanation. I understood the problem and I talked to the team about the problem, I learned that there is a breaking change for v5.0.0.

You can see the details of the issue here: https://github.com/abpframework/abp/issues/9926

Then I added the marked code in the picture below to test the situation, and it worked fine when I made a request via swagger.

However breaks MVC pages and abp's js proxy scripts, which use ajax.


We discuss inside to find the most optimal solution to this problem.

Good morning, yeah I tried that too initially which broke my MVC pages :(

Looking forward to seeing a working solution

hi ianbaddock

If you are using the MVC you don't need to set the ForwardDefaultSelector.

Try to add X-Requested-With: XMLHttpRequest header to your request.

That didnt work unfortunately.

Any other ideas?

That didnt work unfortunately.

Can you share the details?

It has the same outcome as the 200 response with the login page HTML when calling from postman.

I added this in postman as per the suggestion but it did not change the outcome:

"Try to add X-Requested-With: XMLHttpRequest header to your request."

Showing 1 to 10 of 24 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11