Polaris-react: forceRedirect dont work

Created on 6 Nov 2018  ·  5Comments  ·  Source: Shopify/polaris-react

Issue summary


forceRedirect don't work.
Select forceRedirect true, but app dont redirect to shopify admin panel

Expected behavior

Actual behavior

ReactDOM.render(
    <AppProvider
        apiKey={SP_API_TOKEN}
        shopOrigin={SP_DOMAIN}
        forceRedirect={true}
    >
        <ManagePlatforms />
    </AppProvider>
    , document.getElementById('root'));

Specifications

React component
Polaris v. 2.12.1
Browser Chrome
OC: Windows

All 5 comments

👋 Thanks for opening your first issue. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines. You can also join #polaris on the Shopify Partners Slack.

This works for us in production in several apps. Perhaps you need specify the app as "embedded" in the Partner Portal app settings under Extensions and Embedded app?

@improck for directions on enabling an embedded app, take a look at https://help.shopify.com/en/api/embedded-apps/embedded-app-sdk/getting-started#enabling-the-embedded-app-sdk.

Going to close this issue for now, feel free to reopen if this does not resolve the issue.

And @mbaumbach thanks for your help!

+1, kind of.

Enabling forceRedirect=true redirected me to:
https://https//my-shop.myshopify.com/admin/apps/foo/

I think in a previous version of Polaris there was an example where the shopOrigin was being fetched from the DOM, which included the https://

Make sure you do not include the https://

Thanks 👍 . In the 3 version, the problem was solved by itself, everything is working.

Was this page helpful?
0 / 5 - 0 ratings