<?php 
session_start();
include('dbcon.php');

if(isset($_SESSION['verified_user_id']))
{
    $uid = $_SESSION['verified_user_id'];
    $idToken = $_SESSION['idTokenString'];

    try {
        $verifiedIdToken = $auth->verifyIdToken($idToken);
        
        //echo "Working"
    } catch (Exception $e) {
       // echo 'The token is invalid: '.$e->getMessage();
       $_SESSION['expiry_status'] = "Token Expired/Invalid. Login Again";
       header("Location: logout.php");
       exit(0);
    }

}else
{
    $_SESSION['status'] = "Login to access this page";
    header("Location: login.php");
    exit(0); 
}

?>