# האם תוסף oauth2-basic יכול להמיר טקסט ל-json?

**URL:** <https://meta.discourse.org/t/can-plugin-oauth2-basic-convert-text-to-json/237618>\
**Category:** SSO\
**Tags:** oauth2\
**Created:** [30 באוגוסט,‏ 2022,‏ 5:35pm UTC](https://meta.discourse.org/t/can-plugin-oauth2-basic-convert-text-to-json/237618 "2022-08-30T17:35:16Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![qinyj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/qinyj/32/204391_2.png) [@qinyj](https://meta.discourse.org/u/qinyj)\
**Post date:** [30 באוגוסט,‏ 2022,‏ 5:35pm UTC](https://meta.discourse.org/t/can-plugin-oauth2-basic-convert-text-to-json/237618/1 "2022-08-30T17:35:16Z")

</div>

To log in with WECHAT account, I tried to use plugin oatuh2-basic but meet a problem.

Usually, WECHAT server should return `applicaion/json`, then the plugin can read USID in the json string.

Unfortunatly, the server just return `text/plain`, which cannot be read by the plugin.

Here is the result. One has logged in with WEIBO successfully, and the other one tried to login in with WECHAT but failed.

 ![微信截图_20220831005805](https://global.discourse-cdn.com/meta/original/4X/e/a/2/ea2e6aa163fc81482064af3909ea7b5a2f87d7e3.png)

I tried to modify the plugin’s code but failed, cause I have no idea how to deal with ruby language.

So can someone tell me where the code should be edited? Or is there any possibility that the plugin could be updated?

---

_[View the full topic](https://meta.discourse.org/t/can-plugin-oauth2-basic-convert-text-to-json/237618)._
