Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to log in WeChat #5

Closed
MarcusCaeruleus opened this issue Jan 15, 2019 · 11 comments
Closed

Unable to log in WeChat #5

MarcusCaeruleus opened this issue Jan 15, 2019 · 11 comments
Assignees
Labels
question Further information is requested

Comments

@MarcusCaeruleus
Copy link

MarcusCaeruleus commented Jan 15, 2019

When I turn on "Enable WeChat authentication" I am getting the error "Unable to log in WeChat - Authorized callback domain verification error. Error code: 10003" in H5. When I try to access the site through other browsers this does not appear.

Any idea what might be causing this? I presume it is a misconfiguration somewhere, but not really sure where to start.

The website address is https://www.manlaoriver.com and I have left the setting in tack if you would like to see the messgae for yourself.

@froger-me
Copy link
Owner

froger-me commented Jan 15, 2019

Hello @MarcusCaeruleus, and thank you for the heads up.
I assume your domain is not registered in the WeChat backend.

To register the domain and authorize communication between it and the WeChat APIs (frontend JS and server side), you need a website with an ICP license, and then follow the steps below (roughly):

  • connect to the Official Account's backend
  • click "Interface Privilege" menu item
  • in the list, you search for "Web Page Authorization" and click the "Modify" link
  • add your domain in both "JS interface security domain name" and "Webpage authorization domain name" by clicking the "Set-up" link for both sections (add the protocol http or https only if explicitly asked) - make sure to include the MP_verify_[some_code].txt files to the root of your website as instructed, accessible publicly.

I know it is not explicitly stated on the plugin page, but this is the basic requirements for WeChat integration - my apology for this assumption. I plan to update the plugin to version 1.3.1 this week and add information regarding these requirements to the plugin page in the process.

Please let me know if it helped

@froger-me froger-me self-assigned this Jan 15, 2019
@froger-me froger-me added help wanted Extra attention is needed question Further information is requested and removed help wanted Extra attention is needed labels Jan 15, 2019
@froger-me
Copy link
Owner

I have added the instructions above to the README.md file. Please let me know if there is anything else I can do to help - if not, I will close the issue by the end of the week :).

@MarcusCaeruleus
Copy link
Author

@froger-me Thanks for the tip. It helped us along a bit, but we ended up finding out that because our official account was a "subscriber" account rather than a "service" account, we were limited in the kinds of functionaltity available. Setting up a new service account and following the process through seems to have resolved the issue nicely.

@susanta1991
Copy link

susanta1991 commented Jul 16, 2020

I have facing sem problem
https://tinyurl.com/ydxthedq

@froger-me
Copy link
Owner

sem problem, sem solution ;).

@louisditho
Copy link

Hello @MarcusCaeruleus, and thank you for the heads up.
I assume your domain is not registered in the WeChat backend.

To register the domain and authorize communication between it and the WeChat APIs (frontend JS and server side), you need a website with an ICP license, and then follow the steps below (roughly):

  • connect to the Official Account's backend
  • click "Interface Privilege" menu item
  • in the list, you search for "Web Page Authorization" and click the "Modify" link
  • add your domain in both "JS interface security domain name" and "Webpage authorization domain name" by clicking the "Set-up" link for both sections (add the protocol http or https only if explicitly asked) - make sure to include the MP_verify_[some_code].txt files to the root of your website as instructed, accessible publicly.

I know it is not explicitly stated on the plugin page, but this is the basic requirements for WeChat integration - my apology for this assumption. I plan to update the plugin to version 1.3.1 this week and add information regarding these requirements to the plugin page in the process.

Please let me know if it helped

i set like this, now my page repeat at request login many times... can help?

@froger-me
Copy link
Owner

Hi @louisditho,

I would advise to check all the configuration again, in particular URL configurations, down to the protocol (http) to the www vs. non-www, permalinks, trailing slash, etc. This usually happens when the WeChat service does not recognize the page it need to return to after authentication as a valid page.

Without access to your settings, I cannot give more advice. If you need me to spend time troubleshooting your specific setup, I can do so for a fee.

@FireflyStars
Copy link

FireflyStars commented Aug 26, 2020

Hi @froger-me
I've tried to set up "wep page authorization and JS API ..".
But I 've failed all.
I am not using china based on server. I mean I don't use china web server. I just use foreign server.
and I've already upload MP_verify_[some_code].txt file to root directory.
I hope you give me answer at your earliest convenient time.

@froger-me
Copy link
Owner

Hi @FireflyStars
Chinese Law requires you to use a server hosted in China and a domain name with a valid ICP, because you are dealing with user personal information. WeChat requires that too, as they also have to comply with the law.

@sealionking
Copy link

@froger-me Thanks for the tip. It helped us along a bit, but we ended up finding out that because our official account was a "subscriber" account rather than a "service" account, we were limited in the kinds of functionaltity available. Setting up a new service account and following the process through seems to have resolved the issue nicely.

好像订阅号通过认证以后也可以获得这些接口权限,我明天去认证我的订阅号试试。又要花300块。

It seems that after the subscription account gets verified, it can also obtain these API permissions. I'll go try to verify my subscription account tomorrow. It's going to cost another 300 yuan.

@sealionking
Copy link

@froger-me Thanks for the tip. It helped us along a bit, but we ended up finding out that because our official account was a "subscriber" account rather than a "service" account, we were limited in the kinds of functionaltity available. Setting up a new service account and following the process through seems to have resolved the issue nicely.

好像订阅号通过认证以后也可以获得这些接口权限,我明天去认证我的订阅号试试。又要花300块。

It seems that after the subscription account gets verified, it can also obtain these API permissions. I'll go try to verify my subscription account tomorrow. It's going to cost another 300 yuan.

personal subscription account cannot be verified

What t f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants