Skip to content

Commit

Permalink
Fix registration using orcid.
Browse files Browse the repository at this point in the history
[T-CAIREM 1243]
  • Loading branch information
matkaczmarek committed Dec 27, 2024
1 parent d032a02 commit bcfc4bc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion physionet-django/physionet/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand Down
4 changes: 2 additions & 2 deletions physionet-django/user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bcfc4bc

Please sign in to comment.