agilentics / boiler
{% extends "base.html" %}
{% block title %}myapp{% endblock %}

{% block content %}
<div class="card">
  <h1>Signed in</h1>
  <p>Replace this page with your application. What is already wired:</p>
  <ul>
    <li>the session guard (every route protected unless allowlisted)</li>
    <li>CSRF on state-changing requests, via <code>api.post</code></li>
    <li>a <code>Principal</code> carrying this account's scopes and organisation</li>
  </ul>
  <pre id="me">loading…</pre>
</div>
{% endblock %}

{% block scripts %}
<script>
  api.get("/api/me")
    .then((data) => { document.getElementById("me").textContent = JSON.stringify(data, null, 2); })
    .catch((err) => { document.getElementById("me").textContent = err.message; });
</script>
{% endblock %}