{#- A user's sign-in method: the one in force, whether it is their own or the instance default, a change waiting for them (with Resend and Cancel), and the choices. Expects user, sign_in_state, default_method, method_choices, method_label, in_force_label, default_choice, sso_available and sso_off_flag. -#} {% set pending = sign_in_state.pending %}
Sign-in method
Signs in with{{ in_force_label(sign_in_state.effective, sso_available) }}{% if sign_in_state.effective == "sso_only" and not sso_available %} {{ sso_off_flag }}{% endif %}
Setting {% if sign_in_state.setting is none %}Uses the instance default ({{ in_force_label(default_method, sso_available) }}){% else %}Their own method{% endif %}
{% if pending %}
Changing to {{ in_force_label(pending.to_method, sso_available) }} since {{ pending.requested_at.strftime("%Y-%m-%d %H:%M") }}. Until then they keep signing in with {{ in_force_label(pending.from_method, sso_available) }}. {% if pending.link == "set_password" %} It completes when they set a password. {% if pending.link_sent_at %}A set-up link was issued on {{ pending.link_sent_at.strftime("%Y-%m-%d %H:%M") }}.{% else %}No set-up link has been issued: choose Resend.{% endif %} {% elif pending.link == "passkey_registration" %} It completes when they register a passkey. {% if pending.link_sent_at %}A registration link was issued on {{ pending.link_sent_at.strftime("%Y-%m-%d %H:%M") }}.{% else %}No registration link has been issued: choose Resend.{% endif %} {% else %} It completes the first time they sign in through single sign-on. {% endif %}
{% if pending.link and user.status == "active" %}
{% endif %}
{% endif %}

The change takes effect at once if they already have what the new method needs. Otherwise it waits for them, a set-up link is emailed where one is needed, and their current method keeps working.