inveniosoftware / invenio-oauthclient

Invenio module that provides OAuth web authorization support.
https://invenio-oauthclient.readthedocs.io
MIT License
6 stars 74 forks source link

Oauth register should not require email confirmation #256

Closed mb-wali closed 1 year ago

mb-wali commented 3 years ago

Is your feature request related to a problem? Please describe.

As Sysadmin my instance would most likely have both local authentication and remote/OAuth authentication setup.

I would prefer to request an email confirmation from my local authenticated users, but not for my remote/OAuth auth.

Therefore flask-security provides a config variable SECURITY_CONFIRMABLE upon which the register_user method will read the configs and decides on sending the user the confirmation email.

Describe the solution you'd like

Since we are already overriding register_user(invenio-accounts) in we can change the behavior of sending the confirmation link.

For example checking SECURITY_CONFIRMABLE for local authentication and then adding a new variable to check if we want to send the confirmation email for OAuth register users.

ntarocco commented 1 year ago

Addressed by: https://github.com/inveniosoftware/invenio-oauthclient/pull/288