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

django-allauth and transition server state to RTK query #666

Merged

Conversation

dpgraham4401
Copy link
Member

Description

This PR implements our backend authentication through django-allauth and dj-rest-auth. There is also a substainable amount of work done to transition our boilerplate heavy redux/redux toolkit store to RTK Query for things that are related to server state instead of just client state.

Issue ticket number and link

closes #662

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

…auth. This removes some boilerplate and provides a better platform for better growth if ever necessary.

This includes new dependencies, as well as adding some alpine linux packages for building C dependencies (gcc, libc-dev, libffi-dev)

add dj-rest-auth to requirements

add django-allauth to requirements and configurations

rename django 'sites' to 'site' to avoid conflict with django.contrib app called 'sites'
…root of project (App.tsx)

move login call to rtk query endpoint

login endpoint and new api 'slice'
…through RTK query mutation

add get rcrainfo profile to RTK query endpoint

move get rcrainfo profile to RTK query

add get user profile to rtk query
rename RcraProfile to RcrainfoProfile for clarity

update RcraProfile serializer to allow blank/null RCRAInfo API ID and key, update with RTK query mutation
implement basic tagging in RTK query endpoints for caching behavior

replace useHtApi hook usage with RTK query endpoint, remove unused useHtApi
hook

remove old browser setup worker which was not doing anything

reorganize the redux store

remove old profile slice
@github-actions github-actions bot added CI/CD Requires modiciations to the continuous integration pipeline(s) client Related to front end workings (React/Redux) database changes that require modification to the database schema dependencies project dependency problems or modifications documentation Improvements or additions to documentation server Related to backend workings (Django/Rest API) test Unit tests are, or need to be, included labels Dec 19, 2023
@dpgraham4401 dpgraham4401 merged commit 43f6ef4 into USEPA:main Dec 19, 2023
8 checks passed
@dpgraham4401 dpgraham4401 deleted the migrate_auth_to_dependency_and_rtk branch December 19, 2023 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Requires modiciations to the continuous integration pipeline(s) client Related to front end workings (React/Redux) database changes that require modification to the database schema dependencies project dependency problems or modifications documentation Improvements or additions to documentation server Related to backend workings (Django/Rest API) test Unit tests are, or need to be, included
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Upgrade Auth
1 participant