Using Google's Login

https://console.developers.google.com/apis/credentials, create a new OAuth 2.0 credential for a web application, get the key and secret, and put them into the Tsugi configuration file:

$CFG->google_client_id = '96041-nl...jpjj8jlv4.apps.googleusercontent.com';
$CFG->google_client_secret = '6Q7w...ESrl29a';
$CFG->google_map_api_key = 'Ve8eH49498....43cIA9IGl8';

Make sure to add the proper JavaScript origins and authorized redirect urls in your Google credentials configuration.

As a sample, here are some of my JavaScript origins:

http://localhost
https://www.py4e.com
https://www.wa4e.com

You don't need a port number for the JavaScript origin.

Here are my sample redirect URIs:


http://localhost/tsugi/login
https://www.py4e.com/tsugi/login
http://localhost/py4e/tsugi/login
https://www.wa4e.com/tsugi/login
http://localhost/wa4e/tsugi/login

Again, the port seems not to matter. This works both for localhost instances as well as instances on the web which is nice for testing.

Also, in the beginning, the redirect URI for Tsugi ended in /tsugi/login.php - for more recent Tsugi installs, you can drop the php at the end unless you set:

$CFG->google_login_new = false;
in your config.php.