Skip to content

Instantly share code, notes, and snippets.

View s3va's full-sized avatar

Vsevolod Semenov s3va

  • Seva's studio apartment
  • Moskva (Moscow)
View GitHub Profile
@Jerry0022
Jerry0022 / PHP Google oAuth2.php
Last active February 27, 2021 22:37
Google oAuth2, sign up, sign in, logout and show user data. Need to set REDIRECT_URL from google developer console and the https://github.com/google/google-api-php-client cloned in the web directory.
<?php
// Enable error reporting
error_reporting(E_ALL);
ini_set('display_errors', 1);
$google_redirect_url = 'REDIRECT_URL';
//start session
session_start();