# Generic OAuth – map values not applied

**URL:** <https://discuss.write.as/t/generic-oauth-map-values-not-applied/7603>\
**Category:** Instance Admins\
**Tags:** troubleshooting\
**Created:** [December 25, 2022, 10:44am UTC](https://discuss.write.as/t/generic-oauth-map-values-not-applied/7603 "2022-12-25T10:44:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![milan](https://discuss.write.as/user_avatar/discuss.write.as/milan/32/1420_2.png) [@milan](https://discuss.write.as/u/milan)\
**Post date:** [December 25, 2022, 10:44am UTC](https://discuss.write.as/t/generic-oauth-map-values-not-applied/7603/1 "2022-12-25T10:44:00Z")

</div>

Hi there, I have started to experiment with using Zitadel as Writefreely’s auth provider.  
I have adjusted the `map_` values basing on [what they write in their claim documentation](https://zitadel.com/docs/apis/openidoauth/claims#standard-claims):

```auto
scope = openid
map_user_id = sub
map_username = preferred_username
map_display_name = given_name
map_email = email

```

The database looks like `map_user_id` is working and i don’t see any error on the logs ([only `map_user_id` appears to have a defined error in the code it looks like though](https://github.com/writefreely/writefreely/blob/63eb682a6038b73a24fde7b2f67372b3966ac4a8/oauth_generic.go#L134)).  
However the other values are ignored and the user is prompted with an empty form after going through the auth routine.

Now i am wondering if i have used a wrong syntax or what might cause these values to be ignored?

---

<div class="post-metadata">

**Author:** ![matt](https://discuss.write.as/user_avatar/discuss.write.as/matt/32/2760_2.png) [@matt](https://discuss.write.as/u/matt)\
**Post date:** [December 26, 2022, 3:42pm UTC](https://discuss.write.as/t/generic-oauth-map-values-not-applied/7603/2 "2022-12-26T15:42:48Z")

</div>

What does your `oauth_users` table look like? What do you mean by “prompted with an empty form”? Can you share a screenshot of what you’re seeing?

---

<div class="post-metadata">

**Author:** ![milan](https://discuss.write.as/user_avatar/discuss.write.as/milan/32/1420_2.png) [@milan](https://discuss.write.as/u/milan)\
**Post date:** [December 26, 2022, 9:10pm UTC](https://discuss.write.as/t/generic-oauth-map-values-not-applied/7603/3 "2022-12-26T21:10:51Z")

</div>

> [@matt](#):
>
> What does your `oauth_users` table look like?

For each user, this table shows a correct `remote_user_id`, the correct `generic` provider and the matching `client_id` of the application in Zitadel, as well as unique `userid`+`access_token`.

> [@matt](#):
>
> What do you mean by “prompted with an empty form”?

When you (or I) use this auth provider to signup, the form for username, name, email is not prefilled:

 ![SCR-20221226-uqk](https://discuss.write.as/uploads/default/original/2X/8/877d5c9aa5457a5c0336aca651b343fd2513d23b.png)

I was assuming that Writefreely is supposed to prefill these fields based on the related `map_` settings.
