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

Calling currentUser() after creating new account returns null #50

Closed
kamilszpila opened this issue Mar 20, 2024 · 3 comments
Closed

Calling currentUser() after creating new account returns null #50

kamilszpila opened this issue Mar 20, 2024 · 3 comments

Comments

@kamilszpila
Copy link
Contributor

Calling currentUser() after creating new account returns null instead of returning valid ShopifyUser object

    await ShopifyAuth.instance
        .createUserWithEmailAndPassword(email: email, password: password);

    final user = await ShopifyAuth.instance.currentUser(); // user is null
@imsujan276
Copy link
Owner

imsujan276 commented Mar 20, 2024

You have to login in order to get the current user.

The user data is set only when the user is logged in. Register only creates the customer in the Shopify store

@kamilszpila
Copy link
Contributor Author

Why does it work this way?
Cannot we update shopify user after sign up like this? #51

@imsujan276
Copy link
Owner

imsujan276 commented Mar 20, 2024

Yeah, we can. I must have missed it in the signup function. Thanks for pointing it out.

The PR #51 has been merged and is now available in v1.5.12

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

2 participants