Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NextAuth to frontend #912

Merged
merged 31 commits into from
Dec 20, 2024
Merged

Add NextAuth to frontend #912

merged 31 commits into from
Dec 20, 2024

Conversation

AndyRae
Copy link
Member

@AndyRae AndyRae commented Nov 3, 2024

Changes

A significant update to Carrot - moving the Next app to be the actual frontend of the application, and no longer proxied by the Django backend.
The change is therefore that the "legacy" UI of Carrot will no longer work at all. This only used as a "fallback" UI, but this will be breaking change and form the basis of Carrot 3.0.
Related code that can be deleted will be done in follow up pull requests.

This change is particularly necessary for resilience, by uncoupling the frontend/backend.

Includes:

  • Implements NextAuth to use Django credentials to login.
  • Adds a simple login page on the Next app
  • Removes all proxying from the backend
  • Occasional fixes to make things work

Closes #870

Environment changes

Environment variables added:

Frontend

NEXTAUTH_URL=http://127.0.0.1:3000/
NEXTAUTH_SECRET=verycomplexsecretkey
NEXTAUTH_BACKEND_URL=http://127.0.0.1:8000/api/

Backend

SIGNING_KEY=secret

@github-actions github-actions bot added dependencies Pull requests that update a dependency file Area: Backend labels Nov 3, 2024
Copy link

github-actions bot commented Nov 3, 2024

Tests Skipped Failures Errors Time
25 1 💤 6 ❌ 0 🔥 4.588s ⏱️

app/api/api/urls.py Outdated Show resolved Hide resolved
app/next-client-app/components/core/UserMenu.tsx Outdated Show resolved Hide resolved
@AndyRae AndyRae merged commit e82aa29 into master Dec 20, 2024
22 of 23 checks passed
@AndyRae AndyRae deleted the feat/870/next-auth branch December 20, 2024 12:01
@AndyRae AndyRae modified the milestone: 3.0.0 Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Backend dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NextAuth Implementation
2 participants