zorn-v / nextcloud-social-login

GNU Affero General Public License v3.0
198 stars 137 forks source link

How to set up to login using WeChat. #459

Closed ywtoly closed 2 months ago

ywtoly commented 2 months ago

Nextcloud local login/3rd party/hybrid/hybrid/src/Provider /WeChat.php

ywtoly commented 2 months ago

I found that there are many "providers" in the following directory, but they cannot be seen in the NC backend management interface. For example, I have read the code WeChat. PHP and it appears to be usable, but I am not sure how to configure it in the background to make it effective? Because the "client_id" in the "Authorize URL" of WeChat is called as "appid", which is different from the default URL parameter of Social login, can only be achieved by writing a separate PHP file. Even if you can write PHP files now, it's unclear where to configure them to work.

zorn-v commented 2 months ago

You need to add 'WeChat' to DEFAULT_PROVIDERS here https://github.com/zorn-v/nextcloud-social-login/blob/1ff9b80ce092d8513e0f2eaa526343ad0cbdc562/lib/Service/ProviderService.php#L46 Also need icons and styles for login buttons and settings. Check img dir and src/styles.scss for examples