goauthentik / goauthentik/authentik
Add expression return value type requirement to scope mapping documentation
- Dominant language
- Python
- Stars
- 25.6k
- Forks
- 2k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 659
Description
**Is your feature request related to a problem? Please describe.**
The [documentation for Scope Mappings](https://goauthentik.io/docs/property-mappings/#scope-mapping) is very brief, and contains the following sentence:
> Values returned by a Scope Mapping are added as custom claims to Access and ID tokens.
However when testing, i never got the return value of my scope mapping represented in the resulting access token.
I had already prepared a bug report, and only happened to notice in one of the log lines that the return value of the scope mapping expression is apparently assumed to be a dictionary.
From this brief description, i though that perhaps the extra key would just be the name of the scope mapping, and the value would be the value of the expression.
**Describe the solution you'd like**
Document the requirements to the scope mapping expression (like the return value type) to the documentation of scope mappings.
If there is other documentation that contains this information already, i didn't find it, and i guess at least linking there would be nice.
**Describe alternatives you've considered**
I also looked at the [documentation for expressions](https://version-2023-10.goauthentik.io/docs/property-mappings/expression) but couldn't find any info here either (and i guess this would also not be the right place, since expressions are used more generally).
Contributor guide
Assessment
This issue has not been assessed yet.