diff --git a/.env.example b/.env.example index d112c5c9d..07074b8da 100644 --- a/.env.example +++ b/.env.example @@ -103,7 +103,6 @@ ORCID_REDIRECT_URI=http://localhost:8000/authorcid ORCID_CLIENT_ID=SECRET ORCID_CLIENT_SECRET=SECRET ORCID_SCOPE='/read-limited,/activities/update' -ORCID_LOGIN_ENABLED=True ORCID_DOMAIN=https://sandbox.orcid.org ORCID_LOGIN_REDIRECT_URI=http://localhost:8000/authorcid_login ORCID_AUTH_URL=https://sandbox.orcid.org/oauth/authorize diff --git a/physionet-django/physionet/settings/base.py b/physionet-django/physionet/settings/base.py index a94095d08..17d2e9666 100644 --- a/physionet-django/physionet/settings/base.py +++ b/physionet-django/physionet/settings/base.py @@ -45,7 +45,7 @@ ORCID_CLIENT_SECRET = config('ORCID_CLIENT_SECRET', default=False) ORCID_SCOPE = config('ORCID_SCOPE', default=False) ORCID_LOGIN_ENABLED = config('ORCID_LOGIN_ENABLED', default=False) -ORCID_OPEN_ID_JWKS_URL = config('ORCID_OPEN_ID_JWKS_URL', default=False) +ORCID_OPEN_ID_JWKS_URL = config('ORCID_OPEN_ID_JWKS_URL', default="https://sandbox.orcid.org/oauth/jwks") ORCID_LOGIN_BUTTON_TEXT = config('ORCID_LOGIN_BUTTON_TEXT', default="Log in using ORCID iD") diff --git a/physionet-django/user/views.py b/physionet-django/user/views.py index fdf9bd822..bdcc09b3f 100644 --- a/physionet-django/user/views.py +++ b/physionet-django/user/views.py @@ -600,10 +600,10 @@ def orcid_register(request): user = form.save() uidb64 = force_str(urlsafe_base64_encode(force_bytes(user.pk))) token = default_token_generator.make_token(user) - notify_account_registration(request, user, uidb64, token, sso=False) + notify_account_registration(request, user, uidb64, token, sso=settings.ENABLE_SSO) return render( - request, 'user/register_done.html', {'email': user.email, 'sso': False} + request, 'user/register_done.html', {'email': user.email, 'sso': settings.ENABLE_SSO} ) else: form = forms.OrcidRegistrationForm()