From 0a7eef8ff326b65450d70a4b8b16b2f935e29541 Mon Sep 17 00:00:00 2001 From: Atharva Gupta Date: Fri, 15 Dec 2023 01:29:01 +0530 Subject: [PATCH 1/2] googleauth added --- .../__pycache__/__init__.cpython-38.pyc | Bin 141 -> 156 bytes .../__pycache__/settings.cpython-38.pyc | Bin 2344 -> 2896 bytes .../backend/__pycache__/urls.cpython-38.pyc | Bin 0 -> 1059 bytes .../backend/__pycache__/wsgi.cpython-38.pyc | Bin 0 -> 559 bytes backend/backend/settings.py | 29 +++++++++++++++++- backend/backend/urls.py | 5 ++- backend/client blehh mdgsoc.json | 1 + backend/db.sqlite3 | Bin 0 -> 229376 bytes .../user/__pycache__/__init__.cpython-38.pyc | Bin 0 -> 153 bytes backend/user/__pycache__/admin.cpython-38.pyc | Bin 0 -> 194 bytes backend/user/__pycache__/apps.cpython-38.pyc | Bin 0 -> 426 bytes .../user/__pycache__/models.cpython-38.pyc | Bin 0 -> 191 bytes backend/user/__pycache__/urls.cpython-38.pyc | Bin 0 -> 299 bytes backend/user/__pycache__/views.cpython-38.pyc | Bin 0 -> 516 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 164 bytes backend/user/templates/home.html | 13 ++++++++ backend/user/urls.py | 7 +++++ backend/user/views.py | 11 +++++-- 18 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 backend/backend/__pycache__/urls.cpython-38.pyc create mode 100644 backend/backend/__pycache__/wsgi.cpython-38.pyc create mode 100644 backend/client blehh mdgsoc.json create mode 100644 backend/db.sqlite3 create mode 100644 backend/user/__pycache__/__init__.cpython-38.pyc create mode 100644 backend/user/__pycache__/admin.cpython-38.pyc create mode 100644 backend/user/__pycache__/apps.cpython-38.pyc create mode 100644 backend/user/__pycache__/models.cpython-38.pyc create mode 100644 backend/user/__pycache__/urls.cpython-38.pyc create mode 100644 backend/user/__pycache__/views.cpython-38.pyc create mode 100644 backend/user/migrations/__pycache__/__init__.cpython-38.pyc create mode 100644 backend/user/templates/home.html create mode 100644 backend/user/urls.py diff --git a/backend/backend/__pycache__/__init__.cpython-38.pyc b/backend/backend/__pycache__/__init__.cpython-38.pyc index f8fe264d6a36b13eb9fdefdaea01a2e076d9d65e..235494d4d3a9be57f1fc837ed8feb9f233b6effa 100644 GIT binary patch delta 61 zcmeBWoWsZ+%FD~e00a^G)f2gG)ExCQ@^e%56H77@i^>x9T~dp)OY#f!vr5wwQ%ZG9 PiZb(cjr0sA#_0n9_t6qv delta 46 zcmbQk*vrTr%FD~e00g!2YuG7-pA&r3DK8q%Eyq)wbBO^uw=u(G^JDNLgeT4|8y{%XeX&9TlZ8*fnoMxI@ z)2Xx~y$P?C%T}}Iv__8!+bSEHc}&lqN%QrFwPOHj*t~98x=FCVH*#xq>4{;IwvSXb z!^A-viP*O4JgZZcRWpqmNwC-_r=>y`2ZfSyUo8klVMBKNyh}5S$LIAfz*h|blRVWL zgcpvkdcb>MFrjvzL#lOCqgl1x_vkazc3=7&X5iqbFUC+1;gXdE+e(}&LnnEDQ!8(i z8rb}X1;o5}gj%bokM3yI|5||}Qge*5<``D3x9N~c9FwKADCC56S}NrgwNR8EiJ5HC{lFdUwqu=T@`p;8yD7#CJ5gH@xK%6l=Cq%dho zm`Vwl?uZUy0T`I!83VIJoEzf2Lu|@|NV5`HBE@W9os+fbrzPX6WQma^(8Ws>f@QVo3i_ez!he6hG) zILw#JZq3_EKMPHR-wdI@VIJ2{Ewkxd9+?HJb<(ak%vQbT-l^HmbDpA_<_XHwLq#fy UWYm4Cj`+a+p(>?(yB^=pAMMFfp#T5? diff --git a/backend/backend/__pycache__/urls.cpython-38.pyc b/backend/backend/__pycache__/urls.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d5b9518c456429e956a470e4902c9b11f1adca74 GIT binary patch literal 1059 zcma)5L2uJA6n4^dUDIxG=Hy!!sg0rBstth#6O#}JU=r%3b7Qwn7u%8T3|5Z2@K^Xt zxpLw!APzix=~N*h%~jp!*O%{o-{+T$gM%2sV&~uZ_ZC7w-C=ii;P4W@<}+*zO%V%N zSOg-RhJlM)MN34}NVKQz0P%=LJY4UsJGUXkZQf>kx50hfY2tmzcU`=Uru!`Zh>{*H zLxkouyW*1Jix2PcsgjF)S!rr>CFA(hisQ>l7bUfpYiTZVksFJ(sw_9|0fVi=*E#=U zQhcT~7D{uR%Z1XyL*TOD)NpJ#pTro}%G%OQ2w^HSDO*#yRHasHp4l{0f^bQmr(^KC5Kr*xj}DpwCkLiZM(j&PA!TonXAsN?>s_qh;A7ck0JY zy_XCEb`-*+Aa->$7z`U-D<$|4ODg!uz{P_kJ}sy*qd5p;JE;F-q3nulM=Y?7lFmT&x;1V8pkR7FZc+wT+Nrhx!;s;?<|&CL~zEm>Df%Bm6c pP@{4Blr(SG{jUQ}%bR-tSSVH%{6zp@<`A~%Q9pRx>IeSw=P%ukNQVFb literal 0 HcmV?d00001 diff --git a/backend/backend/__pycache__/wsgi.cpython-38.pyc b/backend/backend/__pycache__/wsgi.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2d399361a2c19fe214688f2b43f38fac8ad5df0e GIT binary patch literal 559 zcmYk4&2AGh5XZev+JuFo9#GG|Mk4E~+z=p;QlcP84`~I;W#g_V8>e1-WjpByM-IFO z9C;!nUpes#oS01tiY3ozJev9cJod%GK}v9a;-BGbLddTs*j;T5UgP%1Xe5~unMkUW zX@b6`Y1Nvx5(3Gx{cTUS<=%ISQR@qt?n^o$z5TnN>Bq@%#0qQXs$_HP*rh10z(`g* zyM!WSX*voFZffhnv#Z4%5HY_2?;D-BPX2S^to)c!f=(iT3GOJPd;kEyT~2g9FbCwyVA zgXI!xZEq_ufnWPl@$@&2gN%Dgd{RQlo3nfeBOVRjy%`VB^2zD>`Di?x`k4L&$*Qe0 literal 0 HcmV?d00001 diff --git a/backend/backend/settings.py b/backend/backend/settings.py index cb4d690..bf05c86 100644 --- a/backend/backend/settings.py +++ b/backend/backend/settings.py @@ -30,6 +30,8 @@ # Application definition +SITE_ID = 2 + INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', @@ -37,10 +39,27 @@ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + "user", + "django.contrib.sites", + "allauth", + "allauth.account", + "allauth.socialaccount", + "allauth.socialaccount.providers.google" ] +SOCIALACCOUNT_PROVIDERS = { + "google": { + "SCOPE": [ + "profile", + "email" + ], + "AUTH_PARAMS": {"access_type": "online"} + } +} + MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', + 'allauth.account.middleware.AccountMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', @@ -54,7 +73,7 @@ TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [BASE_DIR / 'templates'], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -123,3 +142,11 @@ # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' + +AUTHENTICATION_BACKENDS = ( + "django.contrib.auth.backends.ModelBackend", + "allauth.account.auth_backends.AuthenticationBackend" +) + +LOGIN_DIRECT_URL = "/" +LOGOUT_DIRECT_URL = "/" \ No newline at end of file diff --git a/backend/backend/urls.py b/backend/backend/urls.py index 7c0c182..ff7f94a 100644 --- a/backend/backend/urls.py +++ b/backend/backend/urls.py @@ -14,8 +14,11 @@ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin -from django.urls import path +from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), + path('accounts/', include('allauth.urls')), + path('accounts/', include('allauth.socialaccount.urls')), + path("", include("user.urls")), ] diff --git a/backend/client blehh mdgsoc.json b/backend/client blehh mdgsoc.json new file mode 100644 index 0000000..a790406 --- /dev/null +++ b/backend/client blehh mdgsoc.json @@ -0,0 +1 @@ +{"web":{"client_id":"1041165213360-c9cmcbvqojmnng2hieo034riucd501t0.apps.googleusercontent.com","project_id":"original-crow-408117","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"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","redirect_uris":["http://127.0.0.1:8000","http://127.0.0.1:8000/accounts/google/login/callback"]}} \ No newline at end of file diff --git a/backend/db.sqlite3 b/backend/db.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..a8f770f126119df1e44be139cefc29808886a6f8 GIT binary patch literal 229376 zcmeI5du&_Tedl>aN)#oM*DnpnmOY{=Yh;criT9G14^15pEzz?4kZenuv7JnBugELv z+I*Q0S(@3|l+H{Obg>130s$69(xSkkK+`|cqPtln%|DwhigeL!k=;c%n+MYLu}!<# zY!akF>vXZ_oO>^MNs*Gq9nXxWUs^imJ?D3R=lA=Z$K`qGa{1;pt*ZLhi{-ph^@nYT zY#e8M$?vz>Y*)x{ocs#pmm|M#kY5M+HD5Gtuh$jZ)P=A05~&{k@2KoK{;~dMuZ&0s z0T2KI5C8!X009sH0T2KI5C8!Xcn1jhQbftnsE33j&OfyAf53l=U*pHTU-52vr#=7Z z`GTkD8FPQ#{VDf~`_SMY4gUOKeBk>7zd5im@SN+ruFt!+T^ITv_y2bPdjBxVju!}k z00@8p2!OzQLSSj6*EYVKtQ6Cll2g*@Vy#dOg+ftT$yL>|+!8OVTh+26XOyZUhQ#os zAWjMqzYv>|;xl4oN{ojDDZ20+Q8>Rtp=7A47VoPCxlqgHl(n2HE2UCLRpGE0i7uS# zs47Bp$)$2}Q_Bz&wTxU*t5vO#t#nc)#3V5izI>9XO6{;JY;j4>sOw5CSCunby4q2b zAcRBli^D`yVuvPC);-HBTXIe!c9tHVO2p%l zi1;(ddu_h+$qLzhsgPMF(Sohj}Z;mO${M~SGHWNmG)ys zM2N-{iTR^M$*Q3wlrWSqhjPmP{0WB>LL_nN2vM|bDvDbbQEmI+B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{NTMi2B{3w1 zCk1g*i1>xXj1ZcM#HYk)NQ{TOq=Y4*=k9x%V#e4ZeAuDcZYB3a!l(kwqBZY)&Xi6!S zOhvVdT22=WRkcuU=&WVlah;Xg8q?Vc5cNaND_V|9DAkQ@tyERSP)K?yOJhy5n25Zo zmbGMtmHl}aS58%lXo z@z2vTXhKO#S8HXKW}?n*gbm7VaHf^%g`kf(ZTUR1p0bL?8o3AjbiSi&=m~3PUi1CZpdg`kf(ZTURC^%(7{oyaOhAqU5Elyoi4=wu#vF!R#wbQch7_h?22JLdKv4!w z##^k3DY=<>ews{Cd?{IpdFlCj$@zIDMVU!OAOlu16fpxSF!9S;KO;XkRX?#LBeAF~ zQQsxCIJ+djKtHQAJu#(J7pNy+*GSJmKPfReJ2fvwzqB~DNFQvvUP0w84x8Nkl+v73 MJ4T>+pMjVG06=ptt^fc4 literal 0 HcmV?d00001 diff --git a/backend/user/__pycache__/apps.cpython-38.pyc b/backend/user/__pycache__/apps.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..14a2771ea3f4ada0696af37c0ce659f1241ca5d4 GIT binary patch literal 426 zcmYjNJ5R$f5Vqq~Dt#=7wGwNF#)uIi)B=L73+j@^a(ix?Hi<(VBLO2F`6K)#uT1;} zCeBSIdeVKq$9E6kd^qe8l+pZMed7D=onr~nnV_0;1Ry|jQqY7_@<<>6wj;n4{a{G| z;S-5EKgc2xbtluRy3^$g`kf(ZTUR7)WJ7{oyaOhAqU5Elyoi4=wu#vF!R#wbQch7_h?22JLdKv4!w z##?N;`6;P6#eSMhw>VR>67$mY^-_|GK$=%F6tMs)F!9SqKO;XkRX?#LBeAF~QQsxC zIJ+djKtHQAJu#(Jx1=aDU)M;_KtCxlIXg8kMZdH-wMZXgvR*;uEe;zXyEG@&juB|! IXCP((0KsZ4@&Et; literal 0 HcmV?d00001 diff --git a/backend/user/__pycache__/urls.cpython-38.pyc b/backend/user/__pycache__/urls.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..faae427eff313d407565e1e88a422f7b75510fd8 GIT binary patch literal 299 zcmYjMJx{|h5cOBmDrtX6hQ9@ zbV3vx+e1^H#Oq{^CF*eG1a9!3#HBy};QLZ0vBYi4?UlR*znknRyU;2fR+HP>)p>m; kpVi9_1}%dJC)3V)e2ep|-s)iBI^F5#2n)L41ucGl0a4sccK`qY literal 0 HcmV?d00001 diff --git a/backend/user/__pycache__/views.cpython-38.pyc b/backend/user/__pycache__/views.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..992e4934a1414989cebe1f0d99ce7f82eff3c324 GIT binary patch literal 516 zcmZWl%}&BV5Z-A^DIy7pPtgM{@v2c1J##T$dNHNDp+L*x>=xtC4PS;=+M}L)1y0Ts z4kS)8e>*?lH~TagoCy+l`=P$c|8R0D9wm3AW=uv336-cJgWAhH;M}YHI>-WweHna- ztRp)zBp=G|qllwlni8?+LR2fM&_$@^993asaABoqy0Hat&rvw`N$*JwGqd88K(`(( z^Cs`TQr9XeZC%BHOl=3wNAg`kf(ZTUR1p0bL?8o3AjbiSi&=m~3PUi1CZpdAwl9``Z htREkrnU`4-AFo$Xd5gm)H$SB`C)EyQ#b+R9008%-C))r3 literal 0 HcmV?d00001 diff --git a/backend/user/templates/home.html b/backend/user/templates/home.html new file mode 100644 index 0000000..6b1d15e --- /dev/null +++ b/backend/user/templates/home.html @@ -0,0 +1,13 @@ + + + + + + Google Authentication + + + {% load socialaccount %} +

Google Login

+ LOGIN WITH GOOGLE + + \ No newline at end of file diff --git a/backend/user/urls.py b/backend/user/urls.py new file mode 100644 index 0000000..64a946c --- /dev/null +++ b/backend/user/urls.py @@ -0,0 +1,7 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path("", views.home), + path("logout", views.logout_view), +] \ No newline at end of file diff --git a/backend/user/views.py b/backend/user/views.py index 91ea44a..c6589ec 100644 --- a/backend/user/views.py +++ b/backend/user/views.py @@ -1,3 +1,10 @@ -from django.shortcuts import render - +from django.shortcuts import render, redirect +from django.contrib.auth import logout # Create your views here. + +def home(req): + return render(req, "home.html") + +def logout_view(req): + logout(req) + return redirect("/") \ No newline at end of file From f8c55e019516b9e2f87e53a36196851390eea869 Mon Sep 17 00:00:00 2001 From: gupta-atharva <122373351+gupta-atharva@users.noreply.github.com> Date: Fri, 15 Dec 2023 01:53:06 +0530 Subject: [PATCH 2/2] . --- backend/client blehh mdgsoc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/client blehh mdgsoc.json b/backend/client blehh mdgsoc.json index a790406..8b13789 100644 --- a/backend/client blehh mdgsoc.json +++ b/backend/client blehh mdgsoc.json @@ -1 +1 @@ -{"web":{"client_id":"1041165213360-c9cmcbvqojmnng2hieo034riucd501t0.apps.googleusercontent.com","project_id":"original-crow-408117","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"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","redirect_uris":["http://127.0.0.1:8000","http://127.0.0.1:8000/accounts/google/login/callback"]}} \ No newline at end of file +