fix(checkout): trigger auth modal on auto-open for unauthenticated users - #136
Open
Hsu-Pei-Chun wants to merge 2 commits into
Open
fix(checkout): trigger auth modal on auto-open for unauthenticated users#136Hsu-Pei-Chun wants to merge 2 commits into
Hsu-Pei-Chun wants to merge 2 commits into
Conversation
Logos50607
force-pushed
the
master
branch
4 times, most recently
from
April 10, 2026 03:51
dc2cb64 to
807ea30
Compare
When checkoutProductId URL param matches, the useEffect called onOpen() directly. But for unauthenticated users the component returns early without rendering the modal, so nothing happened. Now it checks auth state first and calls onAuthRequired() callback instead, allowing the consumer to show the login modal. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… from staying true When fetchCurrentGeolocation or the refresh-token API request fails (e.g. network error, DNS not resolved), the error was unhandled and setIsAuthenticating(false) was never called. This caused isAuthenticating to stay true permanently, blocking any logic that waits for auth to settle (like the checkoutProductId auto-open flow). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Logos50607
force-pushed
the
fix/fix-checkout-modal-auth-on-auto-open
branch
from
April 10, 2026 03:55
5e54332 to
a490e11
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When checkoutProductId URL param matches, the useEffect called onOpen() directly. But for unauthenticated users the component returns early without rendering the modal, so nothing happened. Now it checks auth state first and calls onAuthRequired() callback instead, allowing the consumer to show the login modal.
trello card : https://trello.com/c/xb4DSA1r