How to Build Google Social Login in Django Rest Framework and Nuxt Auth and Refresh its JWT token Part 1

Build end-to-end Social Login screen in Nuxt & Django

Mohamad Fadhil
8 min readDec 15, 2020
Photo by Taras Shypka on Unsplash

Overview

Over the past few weeks, I’ve been working on a side project. One of the requirements is to enable the user to sign in to the application using Google social login. The web app is built using Nuxt for the frontend and Django REST Framework for the backend.

Initially, building the social sign in flow was not hard at first, but I struggled with refreshing the JWT token in the web app. Most of the resources on the internet do not discuss how to refresh the JWT token. In this tutorial series, I will show how to build a basic JAMstack app with Nuxt as the frontend and Django REST Framework for the backend and allow social login from a Google account.

What we’re going to build

We are going to build a simple Nuxt app that accepts user login with Google accounts. It will connect to a Django API Server as a backend.

How Nuxt Auth Google Login Works

--

--