goauthentik / goauthentik/authentik

Cannot use `email` stages in user-settings-change flows

Open
#20,455 0 comments 0 reactions 0 assignees View on GitHub
bug bug/confirmed
Dominant language
Python
Stars
25.6k
Forks
2k
Avg merge
1d 1h
Merged PRs (30d)
644

Description

### Describe the bug

I am trying to configure the use of an email confirmation stage when the user changes their email.

However, the email stage fails with "no pending user" **only** when ran through the user settings page. If I execute the flow with the inspector from the admin settings, it works.

### How to reproduce

1. Apply the following exported blueprint:

```yaml
context: {}
entries:
- attrs:
authentication: require_authenticated
denied_action: continue
designation: stage_configuration
layout: stacked
name: Update your account
policy_engine_mode: any
title: Update your account
conditions: []
identifiers:
pk: c08817f1-021e-4d1b-baab-351f91639f22
slug: main-user-settings-flow
model: authentik_flows.flow
permissions: []
state: present
- attrs:
from_address: system@authentik.local
host: localhost
port: 25
recovery_cache_timeout: minutes=5
recovery_max_attempts: 5
subject: Authentik - Confirm your email
template: email/account_confirmation.html
timeout: 10
token_expiry: minutes=30
use_global_settings: true
conditions: []
identifiers:
name: main-existing-user-email-confirmation-email-stage
pk: bf0aaa50-a7df-481d-8e7f-f5bf5ea033f5
model: authentik_stages_email.emailstage
permissions: []
state: present
- attrs:
invalid_response_action: retry
policy_engine_mode: any
re_evaluate_policies: true
conditions: []
identifiers:
order: 0
pk: 121a8a60-b796-4b00-895f-eb5f5e2a0e4c
stage: bf0aaa50-a7df-481d-8e7f-f5bf5ea033f5
target: c08817f1-021e-4d1b-baab-351f91639f22
model: authentik_flows.flowstagebinding
permissions: []
state: present
metadata:
labels:
blueprints.goauthentik.io/generated: 'true'
name: authentik Export - 2026-02-21 21:42:45.525002+00:00
version: 1
```

2. Try to use the user settings page - you should see a "no pending user" error message.

### Expected behavior

Email stage works from both the inspector and the normal user settings page

### Screenshots

_No response_

### Additional context

_No response_

### Deployment Method

Kubernetes

### Version

2025.10.2

### Relevant log output

```shell

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.