<?php

    $client = new Google_Client();
    $client->setClientId($config["google_settings"]["client_id"]);
    $client->setClientSecret($config["google_settings"]["client_secret"]);
    $client->setRedirectUri($config["google_settings"]["redirect_uri"]);
    $client->addScope("email");
    $client->addScope("profile");

    $login_url = $client->createAuthUrl();
    $smarty->assign('google_login_url', $login_url);
