We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@shopify/[email protected] provided a useNavigate hook permitting programmatic top-level external navigation without requiring user interaction:
@shopify/[email protected]
useNavigate
const navigate = useNavigate(); useEffect(() => navigate(`https://external.com/api/oauth/shopify${location.search}`), []);
Such navigation enables external authorization.
Unfortunately, no such navigation seems to be available for @shopify/[email protected].
The following cases results in a cross-origin resource sharing (CORS) error, but seem to be the recommended use cases according to the documentation:
useEffect(() => window.open(`https://external.com/api/oauth/shopify${location.search}`, "_top"), []);
useEffect(() => window.top.location.href = `https://external.com/api/oauth/shopify${location.search}`;
useEffect(() => { const anchor = document.createElement("a"); anchor.href = `https://external.com/api/oauth/shopify${location.search}`; anchor.target = "_top"; anchor.click(); }, []);
Implement any of the above examples.
Programmatic top-level external navigation should be permitted.
List the relevant packages you’re using, and their versions. For example:
@shopify/app-bridge-react
4.X.X
I am using Vite and React.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
@shopify/[email protected]
provided auseNavigate
hook permitting programmatic top-level external navigation without requiring user interaction:Such navigation enables external authorization.
Unfortunately, no such navigation seems to be available for
@shopify/[email protected]
.The following cases results in a cross-origin resource sharing (CORS) error, but seem to be the recommended use cases according to the documentation:
To Reproduce
Implement any of the above examples.
Expected behaviour
Programmatic top-level external navigation should be permitted.
Contextual information
Packages and versions
List the relevant packages you’re using, and their versions. For example:
@shopify/app-bridge-react
@4.X.X
Platform
Additional context
I am using Vite and React.
The text was updated successfully, but these errors were encountered: