-
Notifications
You must be signed in to change notification settings - Fork 48
Description
According to the shopify OAuth documentation the authorization request includes a 'state' variable: https://{shop}.myshopify.com/admin/oauth/authorize?client_id={api_key}&scope={scopes}&redirect_uri={redirect_uri}&state={nonce}&grant_options[]={option}
When this redirects to my server the api code does not check for the state variable so the 'verifyRequest' method will return false even if that refresh token matches with the request url.
I can monkeypatch it to include it in API.php line 64:
$queryString = http_build_query(array('code' => $da['code'], 'shop' => $da['shop'], 'state' => $da['state'], 'timestamp' => $da['timestamp']));
Maybe this is something you will want to add or at least make it optional if the 'state' variable is omitted in the request (even though its strongly suggested you don't do this).