SSO into Bigcommerce - single-sign-on

I am trying to write a php app to sign users into BigCommerce when they log into my website. I can't see anything in the API docs on logging in or SSO. Does anyone have a pointer to some docs on this?

well, I've tried with a trial store this issue and the only way that I found is using a hidden iframe and a simple javascript. This worked for me, See the example:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html" />
<title>Login BC</title>
<style type="text/css">
input[type="text"],input[type="password"],input[type="submit"],button{
display: block;
padding:4px 6px;
margin: 12px 8px;
border: 1px solid #eee;
}
input[type="text"],input[type="password"]{
width:200px;
}
input[type="submit"],button{
cursor:pointer;
}
#ifr{
display: none;
}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var redirect={
data:{
url:'http://yourstore.mybigcommerce.com/login.php?action=check_login',
redirect:'http://yourstore.mybigcommerce.com/account.php?action=account_details',
login:'customerlogin',
pass:'customerpassword'},
form:function(){
var f='<form method="post" id="bc" action="'+redirect.data.url+'">'+
'<input type="text" name="login_email" value="'+redirect.data.login+'"/>'+
'<input type="password" name="login_pass" value="'+redirect.data.pass+'" />'+
'<input type="submit" value="Login" />'+
'</form>';
$('iframe#ifr').contents().find('html > body').html(f);
$('#ifr').contents().find('form#bc').submit();
},
events:function(){
$('#send').on('click',function(){
redirect.form();
setTimeout(function(){
$('section').append('<button id="goto">Go To Bigcommerce</button>');
},1500);
});
$(document).on('click','#goto',function(){
window.location = redirect.data.redirect;
});
}
};
redirect.events();
})
</script>
</head>
<body>
<div class="content">
<section>
<button id="send">Auto Login</button>
</section>
</div>
<iframe id="ifr"></iframe>
</body>
</html>

Anyone still looking to do something similar can now take a look at the JWT-based Customer Login API (https://developer.bigcommerce.com/api/v2/#customer-login-api).
Combined with the customer read and write endpoints of the API, it should allow an external application to create and login a customer from an external application.

Related

Coinbase API returns Cloudflare captcha check and fails to execute [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
This post was edited and submitted for review 10 months ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
After a year of my server working perfectly fine, since last week, I am no longer able to successfully hit the Coinbase API, even though no code has been changed on my side whatsoever. The response I'm currently getting from all calls, is a HTML page, asking me to complete a captcha. This is of course not possible, so I was hoping if anyone could tell me how to let the API know my calls are genuine.
Anytime I call the list transactions endpoint for example GET https://api.coinbase.com/v2/accounts/:account_id/transactions, this is the response I get:
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en-US">
<!--<![endif]-->
<head>
<title>Please Wait... | Cloudflare</title>
<meta name="captcha-bypass" id="captcha-bypass" />
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css"
media="screen,projection" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]-->
<style type="text/css">
body {
margin: 0;
padding: 0
}
</style>
<!--[if gte IE 10]><!-->
<script>
if (!navigator.cookieEnabled) {
window.addEventListener('DOMContentLoaded', function () {
var cookieEl = document.getElementById('cookie-alert');
cookieEl.style.display = 'block';
})
}
</script>
<!--<![endif]-->
<script type="text/javascript">
//<![CDATA[
(function(){
window._cf_chl_opt={
cvId: "2",
cType: "managed",
cNounce: "17494",
cRay: "6ef7c0529ad19570",
cHash: "993127dea6d4a42",
cUPMDTk: "\/v2\/user?&limit=100&__cf_chl_tk=ENzk.33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h: "DEnwA/GqE2zOarLhzSj8/arJrL5U8H7OKffhxYHzEKo=",
}
};
}());
//]]>
</script>
<style type="text/css">
#cf-wrapper #spinner {
width: 69px;
margin: auto;
}
#cf-wrapper #cf-please-wait {
text-align: center
}
.attribution {
margin-top: 32px;
}
.bubbles {
background-color: #f58220;
width: 20px;
height: 20px;
margin: 2px;
border-radius: 100%;
display: inline-block;
}
#cf-wrapper #challenge-form {
padding-top: 25px;
padding-bottom: 25px;
}
#cf-hcaptcha-container {
text-align: center;
}
#cf-hcaptcha-container iframe {
display: inline-block;
}
#keyframes fader {
0% {
opacity: 0.2;
}
50% {
opacity: 1.0;
}
100% {
opacity: 0.2;
}
}
#cf-wrapper #cf-bubbles {
width: 69px;
}
#-webkit-keyframes fader {
0% {
opacity: 0.2;
}
50% {
opacity: 1.0;
}
100% {
opacity: 0.2;
}
}
#cf-bubbles>.bubbles {
animation: fader 1.6s infinite;
}
#cf-bubbles>.bubbles:nth-child(2) {
animation-delay: .2s;
}
#cf-bubbles>.bubbles:nth-child(3) {
animation-delay: .4s;
}
</style>
</head>
<body>
<div id="cf-wrapper">
<div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please
enable cookies.</div>
<div id="cf-error-details" class="cf-error-details-wrapper">
<div class="cf-wrapper cf-header cf-error-overview">
<h1 data-translate="managed_challenge_headline">Please wait...</h1>
<h2 class="cf-subheadline">
<span data-translate="managed_checking_msg">We are checking your browser...</span> api.coinbase.com
</h2>
</div>
<div class="cf-section cf-highlight cf-captcha-container">
<div class="cf-wrapper">
<div class="cf-columns two">
<div class="cf-column">
<div class="cf-highlight-inverse cf-form-stacked">
<form class="challenge-form managed-form" id="challenge-form"
action="/v2/user?&limit=100&__cf_chl_f_tk=ENzk.33NJDLNBYWzHfXIXyRNVTr2GSNptuhagA9Wgw0-1647876861-0-gaNycGzNB_0"
method="POST" enctype="application/x-www-form-urlencoded">
<div id='cf-please-wait'>
<div id='spinner'>
<div id="cf-bubbles">
<div class="bubbles"></div>
<div class="bubbles"></div>
<div class="bubbles"></div>
</div>
</div>
<p data-translate="please_wait" id="cf-spinner-please-wait">Please stand by,
while we are checking your browser...</p>
<p data-translate="redirecting" id="cf-spinner-redirecting"
style="display:none">Redirecting...</p>
</div>
<input type="hidden" name="md" value="Uk9MnLuGCd5oNpE_ju4ST61NOngvF95h8KPqURw1kuM-1647876861-0-Ab-Yosq9cgug51IzehxFR14UtS_3EWFinahhfDD8bTdjhG1wdNwQ8z64cb5I9U75gBM2ijEK96Qs94_QhM6CzTDiVQi4pYEc_Y3Nx6IpdWFy1gEYab8Y9-mKBo4U3Kk-vc3CG0G6VjLujd9AyoXkgjQS0qQxsVSpOdetbkPNQiOs0RP09aCqXTrbIFZeQuLFlTpUxHPKX_qS4o1GhNbXzs5hjP6ElGjnLmjve-5vm-b_ZfRECVtuai7AQEcLqevZWi01InZaBZga0owxo-B9iSrowbjozT9I9l9saaRmVePbPjxGAqkP-pYP0w_pnLMvQnMJWJZUd5MLNLfaVplAErzLIUnOfPMFXxl7coGb7ZV2-01LAuA6LTqXQy8gHV0Rl3xEZO3SyC-QQbiVo3J3Wuy1d_CouffXehq2WDQjqoBPDWCV0LZhW32Xpw3j4q1ymcC6m_rulBNdKs_1qC1sd-W9_QNrULSzlu3jI9S0gKy-u_XYdyQqAwQ7hbOLo_jWQ7SAjEECwLygOBOlXeNEswOGu20nugvwu2hGuoykvY2GC4qynNK_OTmpaooZdWDuK-z01CkLJmQVE-9eCeUXFPdzRA8JJLa67UpqPY_HP6xS4_zAVEXiS1OUowhyZgdh3D4nL81L2PjFU6KHNG8B2bmyyn46L_C9dsGe9EBYXOObisgVL4ipiwSyug2ofMj3tAdV49bA6HbwQ4sEnW4C6igTpltgfi2IvCfCuwzIZ4nZmbBUviuXTA4ZVCpbW_p6uX5GJI1FfylkPtH-daMvub_MyF5TUR3VuUE6F8InRJP4OMKdZVchEr67HWYCrEZihbBKhdFCATtUABe7c41ViQmiLgCqtmoaJuE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captcha-bookmark" class="cf-captcha-info">
<h1 data-translate="turn_on_js" style="color:#bd2426;">Please turn JavaScript on
and reload the page.</h1>
</noscript>
<div id="no-cookie-warning" class="cookie-warning" data-translate="turn_on_cookies"
style="display:none">
<p data-translate="turn_on_cookies" style="color:#bd2426;">Please enable Cookies
and reload the page.</p>
</div>
<script type="text/javascript">
//<![CDATA[
var a = function() {try{return !!window.addEventListener} catch(e) {return !1} },
b = function(b, c) {a() ? document.addEventListener("DOMContentLoaded", b, c) : document.attachEvent("onreadystatechange", b)};
b(function(){
var cookiesEnabled=(navigator.cookieEnabled)? true : false;
if(!cookiesEnabled){
var q = document.getElementById('no-cookie-warning');q.style.display = 'block';
}
});
//]]>
</script>
<div id="trk_captcha_js"
style="background-image:url('/cdn-cgi/images/trace/captcha/nojs/h/transparent.gif?ray=6ef7c0529ad19570')">
</div>
</form>
<script type="text/javascript">
//<![CDATA[
(function(){
var isIE = /(MSIE|Trident\/|Edge\/)/i.test(window.navigator.userAgent);
var trkjs = isIE ? new Image() : document.createElement('img');
trkjs.setAttribute("src", "/cdn-cgi/images/trace/managed/js/transparent.gif?ray=6ef7c0529ad19570");
trkjs.id = "trk_managed_js";
trkjs.setAttribute("alt", "");
document.body.appendChild(trkjs);
var cpo=document.createElement('script');
cpo.type='text/javascript';
cpo.src="/cdn-cgi/challenge-platform/h/b/orchestrate/managed/v1?ray=6ef7c0529ad19570";
window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.indexOf('?') !== -1 ? '?' : location.search;
window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;
if (window._cf_chl_opt.cUPMDTk && window.history && window.history.replaceState) {
var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;
history.replaceState(null, null, "\/v2\/user?&limit=100&__cf_chl_rt_tk=ENzk.33NJDLNBYWzHfXIXyRNVTr2GSNptuhagA9Wgw0-1647876861-0-gaNycGzNB_0" + window._cf_chl_opt.cOgUHash);
cpo.onload = function() {
history.replaceState(null, null, ogU);
};
}
document.getElementsByTagName('head')[0].appendChild(cpo);
}());
//]]>
</script>
</div>
</div>
<div class="cf-column">
<div class="cf-screenshot-container">
<span class="cf-no-screenshot"></span>
</div>
</div>
</div>
</div>
</div>
<div class="cf-section cf-wrapper">
<div class="cf-columns two">
<div class="cf-column">
<h2 data-translate="why_captcha_headline">Why do I have to complete a CAPTCHA?</h2>
<p data-translate="why_captcha_detail">Completing the CAPTCHA proves you are a human and gives
you temporary access to the web property.</p>
</div>
<div class="cf-column">
<h2 data-translate="resolve_captcha_headline">What can I do to prevent this in the future?</h2>
<p data-translate="resolve_captcha_antivirus">If you are on a personal connection, like at home,
you can run an anti-virus scan on your device to make sure it is not infected with malware.
</p>
<p data-translate="resolve_captcha_network">If you are at an office or shared network, you can
ask the network administrator to run a scan across the network looking for misconfigured or
infected devices.</p>
</div>
</div>
</div>
<div
class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">
<p class="text-13">
<span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">6ef7c0529ad19570</strong></span>
<span class="cf-footer-separator sm:hidden">•</span>
<span class="cf-footer-item sm:block sm:mb-1"><span>Your IP</span>: 78.19.141.77</span>
<span class="cf-footer-separator sm:hidden">•</span>
<span class="cf-footer-item sm:block sm:mb-1"><span>Performance & security by</span> <a
rel="noopener noreferrer" href="https://www.cloudflare.com/5xx-error-landing" id="brand_link"
target="_blank">Cloudflare</a></span>
</p>
</div><!-- /.error-footer -->
</div>
</div>
<script type="text/javascript">
window._cf_translation = {};
</script>
</body>
</html>
Which is a HTML captcha verification check from Cloudflare. Contacted their support and they gave the following response:
Thanks for contacting us. Currently, Coinbase is only providing support through our public API documentation. For help utilizing Coinbase’s API, please use the API key resource/guides found here: https://www.coinbase.com/cloud
If this API is actually usable, then why is there a Cloudflare verification check? Am I doing something wrong from my end? Can anyone from Coinbase kindly look into this and offer a professional response/solution?

jquery datepicker doesn't automatically close in modal dialog once selected

I'm using jQuery 2.1.1 and jQuery UI 1.11.1. If the jQuery dialog is non-modal, then the date picker is dismissed automatically once a date is selected. However, if the dialog is modal, then the datepicker still stays open even once a date is selected.
This only happens with IE 10, not with Chrome or Firefox. Anyone knows how to fix this?
Here is my simple HTML page:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="https://code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css" rel="stylesheet"/>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>
<script>
$(function() {
$("#showDialog").click(function(){
$("#mydate").datepicker();
$("#newdialog").dialog({modal: true});
});
});
</script>
</head>
<body>
<button id="showDialog">Show Modal Dialog</button>
<div id='newdialog' style="display: none; width: 300px; height: 200px;">
<h5>Test DatePicker in modal dialog</h5>
Enter name: <input type="text" id="myname" />
<br />
Select date:<input type="text" id="mydate" />
</div>
</body>
</html>

HTA Time Picker

I'm building an HTA (userform) and would like to add a Time Picker but have been unsucessful getting something to work. I'm using the JQuery Date Picker successfully, but their website does not have any reference to using a Time Picker, or manipulating the date picker to show the time. Since HTA is a stand alone applicaiton I know my options are limited, but hopefully someone knows what I'm missing here. Thanks!
<HEAD>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<style type="text/css">
.ui-datepicker {
background: #035c7e;
border: 1px solid #555;
color: #EEE;}
</style>
<script>
$(function() {
$( "#datepicker1" ).datepicker(); });
</script>
</HEAD>
<BODY>
Shift Date: <input type="text" name="StartDate" id= "datepicker1" size="8">
Start Time: <input type="text" name="StartTime" id= "" size="8">
etc.
</BODY>
Download the 2 external js-files and include them from local filesystem.

Populating a dojo combobox when dojo.ready (dojo 1.7)

I have a comboxbox loading its data from a url store. My code is below... What I noticed in Firebug is that the Combobox loads this info once I put the focus on it. I would love to have the Combobox to populate when the page is done loading.I am guessing I use dojo.ready for this? Does anyone have a suggestion as to how I would pull this off? Many thanks! Janie
<!DOCTYPE html>
<html >
<head>
<link rel="stylesheet" type="text/css" href="lib/dojo/dijit/themes/claro/claro.css" />
<style type="text/css">html, body {
width: 100%;
height: 100%;
margin: 0;
}</style>
<script src="lib/dojo/dojo/dojo.js" data-dojo-config="parseOnLoad: true"></script>
<script>require(["dojo/ready", "dojo/data/ItemFileReadStore", "dijit/form/ComboBox"]);
</script>
</head>
<body class="claro">
<label for="user">User: </label>
<div dojoType="dojo.data.ItemFileReadStore" url="test.json" jsId="countryStore">
<input dojoType="dijit.form.ComboBox" searchAttr="last_name" store="countryStore" class="selectionNav tableData" value="" name="last_name" id="test.json" />
</body>
</html>
your require function should look something like this
require(["dojo/ready", "dijit/registry", "dojo/data/ItemFileReadStore"],function(dom,reg,store){
var combo = dijit.byId("test.json");
var storeDate = new store({url:"path/to/file.json"});
try{
combo.store(storeData);
}catch(e){
combo.set("store",storeData)
}
});
the try catch statement is because I don't remember which is the correct one

GWT getAbsoluteLeft/Top returns wrong value in FF

when i call the getAbsoluteLeft/Top method i always get 0 in firefox. For the IE i get a value which seems to be correct. Are there known problems using these methods ? My problem is that i want to set the position of an element with the absolute position values of another element. Thanks in advance. Edit: Using GWT 2.0.3
kuku
EDIT Testcase:
1. The host page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Web Application Starter Project</title>
<script type="text/javascript" language="javascript" src="samplegwt/samplegwt.nocache.js"></script>
<script type="text/javascript" language="javascript">
function execute() {
var element = document.getElementById("paragraph");
if (element != undefined)
element.style.display = "block";
}
</script>
<STYLE TYPE="text/css">
#paragraph {
display: none;
}
</STYLE>
</head>
<body class="body" onload="execute()">
<div align="center">
<table>
<tr>
<td>
<p id="paragraph">
<input type="text" id="example" value="Foobar" > <img border="0" src="images/some.gif" alt="Test"></p>
</td>
</tr>
</table>
</div>
</body>
</html>
In the onModuleLoad() i simply do this: System.out.println(Document.get().getElementById("paragraph")
.getAbsoluteLeft());
Well as stated in the comments the problem was that the element is not visible which results into 2 different behavoirs for IE and FF.