This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
indieauth/templates/default_exception_response....

33 lines
1018 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/** @var Taproot\IndieAuth\IndieAuthExcepton $exception */
/** @var Psr\Http\Message\ServerRequestInterface $request */
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>IndieAuth • Error!</title>
<style>
</style>
</head>
<body>
<h1>Error: <?= htmlentities($exception->getMessage()) ?></h1>
<p><?= htmlentities($exception->getExplanation()) ?></p>
<!-- If $exception->trustQueryParams() returns false, then the query parameters have been tampered with
and we shouldnt offer the user a redirect back to the client_id! -->
<?php if ($exception->trustQueryParams()): ?>
<p><a href="<?= htmlentities($request->getQueryParams()['client_id']) ?>">Return to app (<?= htmlentities($request->getQueryParams()['client_id']) ?> ?>)</a>
<?php endif ?>
<!-- Youll probably want to offer the user a suitable link to leave the flow. -->
<footer>
<small>Powered by <a href="https://taprootproject.com">taproot/indieauth</a></small>
</footer>
</body>
</html>