Reddirect handler

Included a handler to show how you could get session data. In this case, if user is logged in, they get shown the profile page, instead of the sign-in page. You can customize this to anything, for example removing the login button, and replacing it with the profile picture of Gravatar or something.
This commit is contained in:
2025-05-17 15:39:46 -04:00
parent 122db9c6ee
commit 386451b2d5

View File

@ -1,3 +1,11 @@
<?php
$token = $_SESSION['access_token'] ?? $_COOKIE['access_token'] ?? null;
if ($token) {
header("Location: profile.php");
exit;
}
?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>