From 00b49a0853fa712c1ff2e4400f0972836f8b2957 Mon Sep 17 00:00:00 2001 From: Shivansh Shrivastav Date: Thu, 10 Sep 2026 20:29:07 +0530 Subject: [PATCH 1/4] added google provider in settings.py for signing with google --- poetry.lock | 24 +++++++++++++++++++++--- poetry.toml | 2 +- pyproject.toml | 1 + web/settings.py | 2 ++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 5fba1b224..f7d90f86f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.3.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.4.3 and should not be changed by hand. [[package]] name = "asgiref" @@ -684,8 +684,8 @@ files = [ google-auth = ">=2.14.1,<3.0.dev0" googleapis-common-protos = ">=1.56.2,<2.0.dev0" proto-plus = [ - {version = ">=1.25.0,<2.0.0.dev0", markers = "python_version >= \"3.13\""}, {version = ">=1.22.3,<2.0.0.dev0", markers = "python_version < \"3.13\""}, + {version = ">=1.25.0,<2.0.0.dev0", markers = "python_version >= \"3.13\""}, ] protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0.dev0" requests = ">=2.18.0,<3.0.0.dev0" @@ -1317,6 +1317,24 @@ files = [ {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, ] +[[package]] +name = "pyjwt" +version = "2.13.0" +description = "JSON Web Token implementation in Python" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "pyjwt-2.13.0-py3-none-any.whl", hash = "sha256:66adcc2aff09b3f1bbd95fc1e1577df8ac8723c978552fd43304c8a290ac5728"}, + {file = "pyjwt-2.13.0.tar.gz", hash = "sha256:41571c89ca91598c79e8ef18a2d07367d4810fbbd6f637794879baf1b7703423"}, +] + +[package.dependencies] +typing_extensions = {version = ">=4.0", markers = "python_version < \"3.11\""} + +[package.extras] +crypto = ["cryptography (>=3.4.0)"] + [[package]] name = "pyopenssl" version = "25.0.0" @@ -1951,4 +1969,4 @@ brotli = ["brotli"] [metadata] lock-version = "2.1" python-versions = "^3.10" -content-hash = "637c808ca7e717a872f26b077fadf360e774dccb1b2944f66ee1c8ce2c5ec656" +content-hash = "f30ab3336495c6158fd82fe6a6402f1ed4a04984b77e75c99c55058d0e8a812a" diff --git a/poetry.toml b/poetry.toml index 084377a03..3b549d6c8 100644 --- a/poetry.toml +++ b/poetry.toml @@ -1,2 +1,2 @@ [virtualenvs] -create = false +create = true diff --git a/pyproject.toml b/pyproject.toml index fde77eafb..e217e82b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ django-redis = "^5.4.0" redis = "^6.4.0" mysqlclient = "^2.2.4" psutil = "^7.1.3" +pyjwt = "^2.13.0" [tool.poetry.group.dev.dependencies] djlint = "^1.34.1" diff --git a/web/settings.py b/web/settings.py index 4ddcae8bb..e3cbcdc60 100644 --- a/web/settings.py +++ b/web/settings.py @@ -142,6 +142,8 @@ "channels", "allauth", "allauth.account", + "allauth.socialaccount", + "allauth.socialaccount.providers.google", "captcha", "markdownx", "web", From 732751c4249300844d335ba6f821866e198cfdad Mon Sep 17 00:00:00 2001 From: Shivansh Shrivastav Date: Thu, 10 Sep 2026 22:40:36 +0530 Subject: [PATCH 2/4] added sign up with google option --- web/templates/account/login.html | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/web/templates/account/login.html b/web/templates/account/login.html index 38ac4da1e..7b20ce044 100644 --- a/web/templates/account/login.html +++ b/web/templates/account/login.html @@ -1,7 +1,7 @@ {% extends "allauth/layouts/base.html" %} {% load static %} -{% load account %} +{% load account socialaccount %} {% block extra_head %} {{ block.super }} @@ -87,6 +87,27 @@

+
+
+
+
+
+ + Or continue with + +
+
+ + + + Continue with Google + + + +

Don't have an account? Date: Thu, 10 Sep 2026 23:09:37 +0530 Subject: [PATCH 3/4] added SignUp with google on signup page too --- web/templates/account/login.html | 2 +- web/templates/account/signup.html | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/web/templates/account/login.html b/web/templates/account/login.html index 7b20ce044..4e7028d98 100644 --- a/web/templates/account/login.html +++ b/web/templates/account/login.html @@ -102,7 +102,7 @@

- + Continue with Google diff --git a/web/templates/account/signup.html b/web/templates/account/signup.html index 7720a6a97..0e4415526 100644 --- a/web/templates/account/signup.html +++ b/web/templates/account/signup.html @@ -2,6 +2,8 @@ {% load static %} +{% load account socialaccount %} + {% block extra_head %} {{ block.super }} + + + +{% block extra_body %} + {% block content %} + {% endblock content %} +{% endblock extra_body %} +