mkauthdocs
mkauthdocs copied to clipboard
How do you logout using this package?
How do you logout using this package after logging in?
I presume we could also inject php in html files to create some sort of logout button right?
Bit of a (very) late reply here, but yeah, that's a good point, I could look into that.
All good man... I have worked out the solution many months ago
Here you go
<?php
session_start();
unset($_SESSION['login']);
header("Location:login.php");
?>
This is the template
Then somewhere in the main.py
## Generate Logout Page ##
def generate_logout_page():
with open(pkg_resources.resource_filename('mkauthdocs', 'templates/logout_template.php'), 'r') as f:
template = f.read()
return template
with open(args.build_dir + '/logout.php', 'w+') as f:
f.write(generate_logout_page())
f.close()
Neat, I'll look into merging this hopefully soon then :)
Any progress on this, or should we consider this project abandoned?