Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuickBooks. Doesn't contain Sandbox settings. #909

Open
denis-goncharenko opened this issue Jun 18, 2024 · 3 comments
Open

QuickBooks. Doesn't contain Sandbox settings. #909

denis-goncharenko opened this issue Jun 18, 2024 · 3 comments

Comments

@denis-goncharenko
Copy link
Contributor

Describe the bug

In the current implementation of the authentication providers, the QuickBooks provider is missing the sandbox settings. This is causing issues when trying to authenticate with QuickBooks in a development or testing environment.

Expected behavior

The QuickBooks provider should have a condition to check if the application is in development mode and if so, switch to the sandbox endpoint for user information.

Actual behavior

The QuickBooks provider always uses the production endpoint for user information, regardless of the application environment.

@denis-goncharenko denis-goncharenko changed the title QuickBooks. Doesn't contains Sanbox settings. QuickBooks. Doesn't contain Sandbox settings. Jun 18, 2024
@ehalsey
Copy link

ehalsey commented Jul 23, 2024

This isn't exactly what was requested but I was able to use the QuickBooks provider in sandbox by overriding the UserInformationEndpoint property. I have it hardcoded in this example but you could read it from appsettings.json and override it in appsettings.development.json

        .AddQuickBooks(options =>
        {
            options.ClientId = configuration["QuickBooks:ClientId"] ?? string.Empty;
            options.ClientSecret = configuration["QuickBooks:ClientSecret"] ?? string.Empty;
            options.UserInformationEndpoint = "https://sandbox-accounts.platform.intuit.com/v1/openid_connect/userinfo";
        });

@denis-goncharenko
Copy link
Contributor Author

Thank you for getting back. It's good for me to update the UserInformationEndpoint property for a sandbox. However, in other providers that have sandbox/production or similar setups, we can simply set the environment instead of providing the specific endpoints.

@ehalsey
Copy link

ehalsey commented Jul 23, 2024

@denis-goncharenko I will take a look at making the enhancement. Which provider would you suggest I use as a model for this type of behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants