# Discourse\_api sync\_sso custom\_fields resulta em "custom.custom.\<field\>" no payload

**URL:** <https://meta.discourse.org/t/discourse-api-sync-sso-custom-fields-results-in-custom-custom-field-in-payload/140127>\
**Category:** Bug\
**Created:** [Janeiro 30, 2020, 12:18am UTC](https://meta.discourse.org/t/discourse-api-sync-sso-custom-fields-results-in-custom-custom-field-in-payload/140127 "2020-01-30T00:18:08Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [Agosto 5, 2020, 1:42pm UTC](https://meta.discourse.org/t/discourse-api-sync-sso-custom-fields-results-in-custom-custom-field-in-payload/140127/3 "2020-08-05T13:42:21Z")

</div>

Uma correção foi feita para isso no mês passado:

> <https://github.com/discourse/discourse_api/commit/9587ed754a3f7164d66defe339e48a174bb2f1e7>
>
> \* DiscourseApi::SingleSignOn.custom\_fields adds its own \`custom.\` prefix before …sending the payload
> \`sync\_sso\` expected the params to have the prefix in the params
> This results in \`custom.custom.field\` in the payload
> 
> \* \* I make this look good (•\_•) / ( •\_•)\>⌐■-■ / (⌐■\_■)
> 
> \* - Readme.md
> 
> \* - Style
> 
> \* - Use #sub instead of #gsub. Remove only first instance of \`custom.\`
> 
> \* - Updated spec
> 
> \* - More spec updates
> 
> \* - SingleSignOn.unsigned\_payload no longer prepends its own \`custom.\`
> 
> \* - WIP
> 
> \* \* New parse\_hash init method for DiscourseApi::SingleSignOn
> \* Updated sync\_sso()
> \* custom\_fields params input changed
> 
> \* - Fixed rubocop
> 
> \* - Readme

---

_[View the full topic](https://meta.discourse.org/t/discourse-api-sync-sso-custom-fields-results-in-custom-custom-field-in-payload/140127)._
