BigCommerce single click redirect - bigcommerce

I've created a BigCommerce draft single click app. I'm trying to respond to the app install with a simple php echo statement. I'm getting a redirect message though before my echo statement is displayed. This makes my response cumbersome to anyone that would use it. Why is this happening?

Related

Having an issue for Shopify App listing

I have submitted My app to Shopify App store for review, I got below feedback
I was unable to install your app from the App Store listing. I was redirected to this page after clicking 'Get'. When clicking on 'Get' from the app listing, the app should immediately authenticate using OAuth. Please watch this example of what the required installation flow looks like with OAuth when clicking 'Get' from the App Store Listing.
How can I resolve this?
Any help would be greatly appreciated.
When any one click On get button from shopify app store then you must
have to check that after getting store name it will redirect to your
link on which you have check store permissions & all other things for
shopify store. After checking permissions of store it will
automatically redirect to store OAuth page then you will able to
install app.
You can also check itself where it is redirect when any one click on GET button. Steps for checking:-
Login into shopify partner account Go to Apps-> View App Listing. Then you will check by clicking GET button where it is redirect. You have to check conditions & may also you have to set your App Url Link in app which you created in Shopify partner account.
You can also these things on Shopify Official documentation.
Please Let me know if you getting issue after try this. I am Happy to help you. Thanks !!

Working with cypress redirect

Situation:
I am writing test automation for a website. There comes a point where there is a link button on my website. Clicking this I am redirected to an external website. There I have to log in and as soon as I do that I am redirected to my original web-page which contains some 'connections' that I need.
Problem:
As soon as cypress clicks on the redirection button it does into a blank page.
Ideal solution:
I would want to automate the entire scenario. If not then at-least a work around.
As suggested in the Cypress Docs, you should really be using cy.request() to log in. You don't control a 3rd party site, and that makes your test very flakey.
For example, a lot of login pages are constantly changing and are A/B tested for the purpose of preventing a bot from logging in, including testing bots. The data:, url is probably the result of a http redirect.
Thankfully, using cy.request() you can 'fake' logging in by making a request to the server through code (which doesn't change as much) and you will never have to leave your app to log in
Here's a recipe for Single Sign-On for example.
Hope that makes sense!

Ionic 2 how to make InAppBrowser and other plugins work when running in a browser

I'm creating a app in Ionic 2, wich consumes a web api from an existing site. To use this API i have to make athenticate in it in the following way (Similar to facebook login):
I call the api login page in a InAppBrowser component, sending the proper keys and a return URL.
the user types the login and password in the form displayed, the API will validate it and authenticate it.
The API calls the return URL passing the authorization token.
I 'hijack' this redirect to the return url in the InAppBrowser 'loadstart' event, and extract and store the authorization token.
In the following calls to the API, i send the authorization token in the header.
This is all working fine in the emulator, but it doesn't work in the browser (with ionic serve), because when i call InAppBrowser it actually calls window.open, and the events doesnt work. I can't detect the redirect action made in the opened window.
I'd like to make this work in the browser since its better to debug the application there. My first thought was to send "http://localhost:8001" as the return url, but I couldn't find a way to catch the token parameter in the ionic application.
Does anyone know how I can catch this parameter or any other way to make this login work in the browser? It is for development and debug purposes only, so strict security is not a issue (I can comment out any unsecure code in the production version).
Edit: Hayden Braxton answer didn't solve my problem, but since it was because of something exclusively to my app, and it could really help someone who wants to make plugins work, I'll keep it as the selected answer.
Besides that, I'll share the solution I found to my problem in case it could help anyone. It was simple, actually:
I pass "http://localhost:8001" as the api return_uri parameter
the api will, after checking the login and password, redirect to http://localhost:8001?token=MY_AUTH_TOKEN.
This will reload the application and call login page again.
In the login page i call this.platform.getQueryParam("token"); to get the token.
Add
"browser": "ionic-app-scripts serve --iscordovaserve --sourceMap source-map --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build",
to the script section of your package.json. Then instead of doing ionic serve, instead run
npm run browser
We use ionic2 to develop our apps where I work, and this is what we figured out after some research.
Before using this, you need to have the browser platform added. You can accomplish this with the following:
ionic add platform browser
If the browser platform is already added, delete the browser directory from your platforms directory and then run the add platform command, just to be on the safe side.

App installation in BigCommerce

I have a problem with BigCommerce installation process.
According to documentation (https://developer.bigcommerce.com/api/callback) I receive GET request, do exchange for OAuth info via POST request and return HTML page to user.
App seems successfully installed, I can see it in left panel, but it don't send request to LoadCallback with signed payload. When I click to application's icon it just hides/shows HTML page that I send during intallation.
Seems like the only way to make BigCommerce do LoadCallback request is to open app after relogin.
Did I do something wrong during installation process?
No, this is intended behavior. Most apps have a sign up process that cause a frame reload of the app. You can force a reload after installation or use a form submission action via javascript. Alternatively, you can reload the control panel and reopen app or relogin and open.

google oauth not redirect properly

I am working on site where I have used google OAuth 2.0. when I click on login link on my index page, it takes me to the login page of the google ( all required credentials with clien_id, key, redirect url has been passed with the link) and after entering credentials, it ask for granting access to the app. when I click on grant access instead of redirecting to my redirect page it shows me following error.
You've reached this page because we have detected that Javascript is disabled in your browser. The page you attempted to load cannot display properly if scripts are disabled.
Please enable scripts and retry the operation or go back in your browser.
but in my all browsers javascript is enabled and working fine. what should I do now ?
I can probably help you figure it out. If the "granting access" page loads and doesn't give you the JS error, but you get it after submitting the form on the page, then there is something strange with your browser and it's not submitting the form correctly.
Can you tell me what browser you can reproduce this on? And if possible can you give the headers and post body of your request after you submit the form?
Getting that error when the gstatic.com domain isn't enabled in the noscript addon for firefox.