O
O
onemantwo2017-05-13 19:54:59
In contact with
onemantwo, 2017-05-13 19:54:59

Why is the wrong signature VK IFrame formed?

Good afternoon. I am writing an application for the VK community. I am implementing data authentication and here a problem has surfaced: I am implementing exactly the same code as described here :
I am trying to generate a signature as indicated in the documentation, as a result, with the signature that VK gives, my signature does not match, I twist $ _GET. Tell me what's funny?

$sign = ""; 
$request = $_GET;

foreach ($request as $key => $param) { 
  echo($key."===".$param."<br>");
    if ($key == 'hash' || $key == 'sign') continue; 
    $sign .=$param; 

} 

$secret = '****'; 
$sig = $secret ? hash_hmac('sha256', $sign, $secret) : "";


There was already a similar question , but there was no answer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
onemantwo, 2017-05-13
@onemantwo

Ehh. As usual, as soon as I decided to ask on the network, I found the problem myself. The thing is that the route parameter was added along the way, it spoiled everything.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question