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

Authenticator Null Reference #70

Closed
jmawebtech opened this issue Jan 23, 2023 · 5 comments
Closed

Authenticator Null Reference #70

jmawebtech opened this issue Jan 23, 2023 · 5 comments

Comments

@jmawebtech
Copy link

Hi,

I am in QbManager > AuthenticateAsync.

I receive a null reference here on line 82:

quickbooks-sync\test\WebApplication.Sample\Application\Authenticator.cs

How is your code getting the current step? I just passed the

image

@jsgoupil
Copy link
Owner

I would probably have to see the callstack, but the CurrentStep is set
https://github.com/jsgoupil/quickbooks-sync/blob/master/src/WebConnector.AspNetCore/QbManager.cs#L175

The first time this run, the step will be null.
This is handled here.
https://github.com/jsgoupil/quickbooks-sync/blob/master/src/WebConnector.AspNetCore/QbManager.cs#L557-L560

If the Step is null all the time, maybe you didn't register any steps?

@jmawebtech
Copy link
Author

In your Authenticator class, you must return a step:

return new QbTicket
{
Authenticated = true,
Ticket = guid,
CurrentStep = "ItemQuery",
// We store more information about the ticket, such as the user.
// Check the extension to learn how to reach for this user.
User = user,
UserId = user.Id
};

@jsgoupil
Copy link
Owner

The CurrentStep is not controlled by the user, it's controlled by the package. You just have to save it and return it as is.

@OleksiiSydorov
Copy link

i have the same error. just downloaded the sample application.

@jsgoupil jsgoupil reopened this Jun 6, 2023
jsgoupil added a commit that referenced this issue Jun 6, 2023
Fix #70. The CurrentStep can be null.
@jsgoupil jsgoupil removed the question label Jun 6, 2023
@jsgoupil
Copy link
Owner

jsgoupil commented Jun 6, 2023

This is fixed in 3.1.3
Thanks for reporting @jmawebtech , @OleksiiSydorov

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

No branches or pull requests

3 participants