Add Auth0, partial support
This commit is contained in:
7
src/public/user/log-off.php
Normal file
7
src/public/user/log-off.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use MyPrayerJournal\Auth;
|
||||
|
||||
require '../../start.php';
|
||||
|
||||
Auth::logOff();
|
||||
7
src/public/user/log-on.php
Normal file
7
src/public/user/log-on.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use MyPrayerJournal\Auth;
|
||||
|
||||
require '../../start.php';
|
||||
|
||||
Auth::logOn();
|
||||
11
src/public/user/log-on/success.php
Normal file
11
src/public/user/log-on/success.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
use MyPrayerJournal\Auth;
|
||||
|
||||
require '../../../start.php';
|
||||
|
||||
Auth::client()->exchange($_ENV['AUTH0_BASE_URL'] . '/user/log-on/success');
|
||||
|
||||
// TODO: get the possible redirect URL
|
||||
header('Location: /');
|
||||
exit();
|
||||
Reference in New Issue
Block a user