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

How to run non embeded app #419

Open
anurag3386 opened this issue Feb 15, 2023 · 14 comments
Open

How to run non embeded app #419

anurag3386 opened this issue Feb 15, 2023 · 14 comments

Comments

@anurag3386
Copy link

I am trying to setup non embedded app with the help shopify cli3 using php template.
I have disabled embedded app from the shopify section but app still not working as non embedded. Please help what change we need to do at script level under the laravel.

@shahzadwaris
Copy link

@anurag3386 Did you find out any solution for this? I'm also facing the same issue.

@shahzadwaris
Copy link

Okay, I found the solution.

  1. Log in to your Partner account and select your app.
  2. Click on App Setup from the left sidebar and scroll to the bottom.
  1. Embedded app: Click on manage and turn it off.
  2. Modify the code in AppServiceProvider.php
    Context::initialize( env('SHOPIFY_API_KEY', 'not_defined'), env('SHOPIFY_API_SECRET', 'not_defined'), env('SCOPES', 'not_defined'), $host, new DbSessionStorage(), ApiVersion::LATEST, false, false, null, '', null, (array)$customDomain, );
    An extra step would be changing the redirect URL in /api/auth/callback route to your customer route.
    This is done.

@anurag3386
Copy link
Author

Hello @shahzadwaris

I already fixed the same after lots reading the steps in code and do the same thing.

Thanks
Anurag

@ellowwwteam
Copy link

@shahzadwaris
I'm Modify the code in AppServiceProvider.php. Also, changed the custom route URL for in "/api/auth/callback" redirect. But, It's continuously refresh page and not redirecting to custom route URL.

@shahzadwaris
Copy link

@ellowwwteam did you add the HOST with your custom domain in the .env file?

@ellowwwteam
Copy link

@shahzadwaris Yes, I have update the host in .env file. Any other changes need fixing the non embedded app?

@khanakia
Copy link

App is continuously refreshing and redirecting again and again after i made it Non Embeddable

@shahzadwaris
Copy link

Did you follow the above instructions?

@khanakia
Copy link

Yes, i found my App Setup was set to Add Embed usually that does not happen when you create a new app.

@sk29110
Copy link

sk29110 commented Jan 20, 2024

I started working on the none embeded app. Call to a member function send() on null. @shahzadwaris you are very confident about this can work as none embeded app. How do you do the last step?

An extra step would be changing the redirect URL in /api/auth/callback route to your customer route.
This is done.

@shahzadwaris
Copy link

@sk29110 Can you please show me the error or exception page?

@sk29110
Copy link

sk29110 commented Jan 20, 2024

Just to make it clear I made another app then the following changes

  1. Set "You app is not embedded" in Shopify Admin
  2. Update AppServiceProvider so $isEmbeddedApp = false
    Then when I click on the app link it does show up in another tab but with this error message
    @shopify/cli/3.52.0 darwin-arm64 node-v21.5.0 npm-10.2.4
    image

@sk29110
Copy link

sk29110 commented Jan 23, 2024

Any idea? @shahzadwaris

@kamalsharma9392
Copy link

Hey @sk29110 & @shahzadwaris , did you guys able to solve this issue, I am also facing the same issue

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

6 participants