Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
orcid-login: working locally
Browse files Browse the repository at this point in the history
  • Loading branch information
DonHaul committed Aug 5, 2024
1 parent 61fc2fc commit a0751ff
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions backoffice/config/api_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

router.register("users", UserViewSet)


# Workflows
(
router.register(
Expand All @@ -24,5 +25,7 @@
"workflow-update", WorkflowPartialUpdateViewSet, basename="workflow-update"
)
(router.register("workflow-ticket", WorkflowTicketViewSet, basename="workflow-ticket"),)


app_name = "api"
urlpatterns = router.urls
3 changes: 2 additions & 1 deletion backoffice/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@
"client_id": env("ORCID_CLIENT_ID", default=""),
"secret": env("ORCID_CLIENT_SECRET", default=""),
"key": "",
}
},
"BASE_DOMAIN": "sandbox.orcid.org",
}
}

Expand Down
4 changes: 4 additions & 0 deletions backoffice/config/urls.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from allauth.socialaccount.providers.orcid.views import oauth2_callback
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
Expand Down Expand Up @@ -28,6 +29,9 @@
# API URLS
urlpatterns += [
# API base url
path(
"api/oauth/authorized/orcid/", oauth2_callback, name="orcid_callback"
), # Custom ORCID callback URL
path("api/", include("config.search_router")),
path("api/", include("config.api_router")),
# DRF auth token
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ services:
retries: 5
start_period: 5s
restart: always
ports:
- "5432:5432"

redis:
image: redis:latest
Expand Down

0 comments on commit a0751ff

Please sign in to comment.