using django authentication and session on remote front end - django

I have a website that front-end and back-end are on different servers. Front-end part is on angular 2 and webpack and gets dynamic data from back-end using ajax.
Back-end uses django framework for database management and ORM.
Is it possible to use django authentication and session management and Auth.User model for the front-end in back-end part?

Related

Django and Next.js shared Authentication

I am building a new front end with Next.js for my Django App. I have been splitting the development to keep all the dashboard running on Django, while the rest runs on Next.js.
Next.js is running on <domain.com>. The existing Django will be running on dashboard.<domain>.com.
I have setup all the REST Authentication for Next.js and is working fine.
Now what I'm trying to achieve is when you login from <domain>.com you don't need to authenticate to the dashboard and reuse the same Authentication.
Django seems to have some cookie Authentication and I'm using JWT for Next.js.
What would be my options to solve this dilemma?

Adding a Direct Messaging page to react native social media app with Django backend

I am trying to develop a react native social media app with Django backend. I need my app to have a Direct Messaging page. I already have made the Django backend and the React Native frontend without the messaging functions. How can I add the Direct Messaging to my existing backend and frontend?

Django REST with SPA - what structure

Django REST with SPA "within" or completely stand alone?
I'm diving into a new project where I'll try to build a SaaS web application and I've set on using Django Rest (with Postgres to utilize schemas) and React/Vue on the frontend.
What I'm unsure and what I can't seem to get an answer to is the way people structure these frameworks. E.g, on https://www.valentinog.com/blog/drf/ the author writes:
I see the following patterns (which are common to almost every web
framework):
React in its own “frontend” Django app: load a single HTML template
and let React manage the frontend (difficulty: medium)
Django REST as a standalone API + React as a standalone SPA
(difficulty: hard, it involves JWT for authentication)
Mix and match: mini React apps inside Django templates (difficulty:
simple)
And here are my advices.
If you’re just starting out with Django REST and React avoid the
option 2.
Go for option number 1 (React in its own “frontend” Django app) if:
you’re building an app-like website
the interface has lot of user interactions/AJAX
you’re fine with Session based authentication
there are no SEO concerns
you’re fine with React Router
Why is this beneficial, and is it actually different from having a stand alone rest api and a standalone SPA? The reason I wanna use Django is so I don't have to worry about authentication and authorization, and I also plan on utilising the admin panel - will this "not work" if I were to use two completely standalone applications for the backend and frontend? (e.g django rest with the sole purpose of exposing the api and the frontend to consume it).
What alleged benefits do I get from having django rest and SPA in the same "root" project

How should I implement reCaptcha v3 if my front and backend live on different domains?

I have several websites (SPAs), each one running on it's own domain. All these SPAs use the same API, which is hosted on another domain.
I'd like to implement reCaptcha v3 on my SPAs, but I'm not really sure how exactly the entire validation process would work.
Who would be in charge of receiving the callback from Google's service? If the backend, how does the frontend validate itself to the backend?
The SPAs are made with Vue and the backend is a Django app with Django Rest Framework. The backend is stateless, so there are no cookies.

Angular 6 and DRF Django Social authentication

I'm using Angular 6 for the front-end and for the back-end I have Django. I connect the front-end and back-end with Django Rest Framework. I need to implement social authentication with (Google, Facebook, LinkedIn). right now I'm using angular-6-social-login. But I don't know how to implement it in the back-end.
use this package https://github.com/RealmTeam/django-rest-framework-social-oauth2
It is one of the packages listed on the Django Rest Framework documentation https://www.django-rest-framework.org/api-guide/authentication/#django-oauth-toolkit