Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit333f948

Browse files
committed
Add facebook login, remove google for now
1 parentfb031ca commit333f948

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

‎backend/book/settings.py‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
'allauth.socialaccount',
4848
'allauth.socialaccount.providers.github',
4949
'allauth.socialaccount.providers.google',
50-
#'allauth.socialaccount.providers.facebook',
50+
'allauth.socialaccount.providers.facebook',
5151
'django_user_agents',
5252
'crispy_forms',
5353
]
@@ -167,14 +167,15 @@
167167
'AUTH_PARAMS': {
168168
'access_type':'offline',
169169
}
170-
}
171-
# 'facebook': {
172-
# 'APP': {
173-
# 'client_id': '123',
174-
# 'secret': '456',
175-
# 'key': ''
176-
# }
177-
# }
170+
},
171+
'facebook': {
172+
'METHOD':'js_sdk',
173+
'SCOPE': ['email'],
174+
'APP': {
175+
'client_id':FACEBOOK_APP.ID,
176+
'secret':FACEBOOK_APP.SECRET,
177+
},
178+
},
178179
}
179180

180181
try:

‎backend/main/simple_settings.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ class GITHUB_APP(DryEnv):
3737
SECRET=''
3838

3939

40+
classFACEBOOK_APP(DryEnv):
41+
ID=''
42+
SECRET=''
43+
44+
4045
classGOOGLE_APP(DryEnv):
4146
ID=''
4247
SECRET=''

‎backend/main/static/css/main.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119

120120
.social-btn.btni {
121121
float:left;
122-
margin:3px10px;
122+
margin:3px10px3px1px;
123123
font-size:20px;
124124
}
125125

‎backend/main/static/logo/512.png‎

40.3 KB
Loading

‎backend/main/templates/account/login.html‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@
2626
<h2>Sign In</h2>
2727

2828
<divclass="social-btn text-center">
29-
<ahref="{% provider_login_url 'google' process='login' %}"class="btn btn-google btn-lg"><i
30-
class="fab fa-google"></i> Google</a>
29+
{#<ahref="{% provider_login_url 'google' process='login' %}"class="btn btn-google btn-lg"><i#}
30+
{#class="fab fa-google"></i> Google</a>#}
31+
<ahref="{% provider_login_url 'facebook' process='login' %}"class="btn btn-facebook btn-lg"><i
32+
class="fab fa-facebook"></i> Facebook</a>
3133
<ahref="{% provider_login_url 'github' process='login' %}"class="btn btn-github btn-lg"><i
3234
class="fab fa-github"></i> GitHub</a>
3335
</div>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp