login.ejs
482 Bytes
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>logined</title>
</head>
<body>
<a href="/index" onclick="signOut();">Sign Out</a>
<h1>Hi <%= user.name %></h1>
</body>
<script>
function signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
console.log('User signed out.');
});
}
</script>
</html>