You can subscribe to events with the <hanko-auth> and <hanko-profile> components in the same way. You can also bind event handlers using the frontend-sdk (see the next section).

Usage

Markup

<hanko-events id="events"></hanko-events>
<script>
  document
    .getElementById("events")
    .addEventListener("onSessionCreated", console.log);
  // more events are available (see "frontend-sdk" docs)...
</script>