Skip to content

Create amora#110

Closed
usushshwhshs wants to merge 1 commit intogithub:mainfrom
usushshwhshs:patch-1
Closed

Create amora#110
usushshwhshs wants to merge 1 commit intogithub:mainfrom
usushshwhshs:patch-1

Conversation

@usushshwhshs
Copy link

$value) { $data_check_arr[] = $key . '=' . $value; } sort($data_check_arr); $data_check_string = implode("\n", $data_check_arr); $secret_key = hash('sha256', BOT_TOKEN, true); $hash = hash_hmac('sha256', $data_check_string, $secret_key); if (strcmp($hash, $check_hash) !== 0) { throw new Exception('Data is NOT from Telegram'); } if ((time() - $auth_data['auth_date']) > 86400) { throw new Exception('Data is outdated'); } return $auth_data; } function saveTelegramUserData($auth_data) { $auth_data_json = json_encode($auth_data); setcookie('tg_user', $auth_data_json); } try { $auth_data = checkTelegramAuthorization($_GET); saveTelegramUserData($auth_data); } catch (Exception $e) { die ($e->getMessage()); } header('Location: login_example.php'); ?>

@github-actions
Copy link

At the moment we are not accepting contributions to the repository.

Feedback for GitHub Copilot for Xcode can be given in the Copilot community discussions.

@github-actions github-actions bot closed this Jan 13, 2025
@Pedjapiksi1
Copy link

Pedjapiksi1 commented Jan 13, 2025 via email

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

Successfully merging this pull request may close these issues.

2 participants