{% extends "base.html" %} {% block title %}{{ t('Account & security') }} — {{ site_name }}{% endblock %} {% block content %}

{{ t('Account & security') }}

{{ t('Manage identity, authentication, API access, teams, and active sessions.') }}

{{ t('Identity') }}

{{ current_user.email }}

{{ t('Verified') if current_user.email_verified_at else t('Unverified') }}
{% if config.SMTP_HOST and not current_user.email_verified_at %}
{% endif %}

{{ t('Password & 2FA') }}

{{ t('Protect interactive access to your account.') }}

{% if current_user.totp_enabled %}
{% else %}{{ t('Set up two-factor authentication') }}{% endif %}

{{ t('Active sessions') }}

{{ t('Revoke devices you no longer use.') }}

{% for item in sessions %}
{{ item.user_agent or t('Unknown client') }}{{ item.ip_address }} · {{ item.last_seen_at.strftime('%Y-%m-%d %H:%M') }}{% if item.revoked_at %} · {{ t('Revoked') }}{% endif %}
{% if not item.revoked_at %}
{% endif %}
{% endfor %}

{{ t('API keys') }}

{{ t('Scoped access for automation and integrations.') }}

{{ t('Scopes') }}{% for scope in ['domains:read','domains:write','dns:read','dns:write','acme:write'] %}{% endfor %}{% if current_user.is_admin %}{% endif %}
{% for key in api_keys %}
{{ key.name }}{{ key.prefix }}… · {{ key.scopes }} · {{ t('Expires') }} {{ key.expires_at.strftime('%Y-%m-%d') if key.expires_at else t('Never') }}{% if key.revoked_at %} · {{ t('Revoked') }}{% endif %}
{% if not key.revoked_at %}
{% endif %}
{% endfor %}

{{ t('Teams') }}

{{ t('Share domain operations with role-based access.') }}

{% for membership in memberships %}
{{ membership.team.name }}{{ membership.team.slug }}
{{ t(membership.role|replace('_', ' ')|title) }}
{% if membership.team.owner_id == current_user.id %}
{% for member in membership.team.members %}
{{ member.user.username }}{{ member.user.email }} · {{ t(member.role|replace('_', ' ')|title) }}
{% if member.user_id != membership.team.owner_id %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}

{{ t('Notifications') }}

{{ t('Account and infrastructure events.') }}

{% for item in notifications %}

{{ t(item.title) }}{{ item.body }}

{% else %}

{{ t('No notifications yet.') }}

{% endfor %}
{% endblock %}