Skip to content

Commit

Permalink
logout
Browse files Browse the repository at this point in the history
  • Loading branch information
Adi Chikara committed Apr 23, 2015
1 parent 15744a1 commit 543882d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<div>
<?php if(isset($_SESSION['user']['name'])) { ?>
Hello <?php echo $name; ?>
<br />
<a href='logout.php'>Logout</a>
<?php } else { ?>
<a href='callback.php'>Login</a>
<?php } ?>
Expand Down
7 changes: 7 additions & 0 deletions logout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
session_start();
session_destroy();

header("Location: http://localhost:3000/signout?redirect_uri=http://openid.local");

?>

0 comments on commit 543882d

Please sign in to comment.