zorn-v / nextcloud-social-login

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

Allow login via email with different UID #273

Closed mmaridev closed 3 years ago

mmaridev commented 3 years ago

Hi and thank you for your great work with this plugin. Just here to mention this few modifications we did in order to be able to authenticate users that already exist in Nextcloud, have uid != email and authenticate via OAuth2 using the email. This allows us to match the existing user to the one authenticated via OAuth2. Maybe you could move this code to and if-driven conditional and add a specific setting.

zorn-v commented 3 years ago

Email may be not validated on provider side. So any user can become admin (if know his email).