goauthentik / goauthentik/authentik
Username Prefilled with Invitation Token
- Dominant language
- Python
- Stars
- 25.6k
- Forks
- 2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 644
Description
**Describe the bug**
So I tried to add invitation stage on federated enrollment.
The flow is something like this:
1. On first order, I have prompt stage, with one optional text prompt with field key "token" as mentioned in https://goauthentik.io/docs/flow/stages/invitation/
2. On the second order I have the invitation stage.
3. Then on the 3rd order I have prompt stage which one of them is text prompt with field key "username".
The weird thing is, when I filled the invitation prompt with correct token, then It will use the invitation, but the username prompt is prefilled with the token just like on the image.
**To Reproduce**
Steps to reproduce the behavior:
1. Create invitation token without username attribute
2. Create flow with invitation stage and username prompt
3. Use the invitation token
4. Username prompt filled with the invitation token UUID
**Expected behavior**
Username prompt should be empty if not provided in the invitation token
**Screenshots**

**Version and Deployment (please complete the following information):**
- authentik version: 2023.10.2
- Deployment: docker-compose
**Additional context**
I do have expression policy to prefill username prompt_data with trimmed email address, but it doesn't works -the username prompt filled with the invitation token still. But If I refresh the flow execution page, the username is prefilled correctly with the trimmed email address.
This issue also been discussed on Discord https://discord.com/channels/809154715984199690/1164417523022839818
Contributor guide
Assessment
This issue has not been assessed yet.