1.5 KiB
1.5 KiB
main info
https://medium.com/scalereal/the-ultimate-guide-to-using-social-login-in-django-f0abe0022ab0
facebook settings
these settings are needed for csrf to work
ACCOUNT_DEFAULT_HTTP_PROTOCOL='https'
source for account default setting
CSRF_TRUSTED_ORIGINS = ['https://oauth.drftesting.net']
ALLOWED_HOSTS = ['https://oauth.drftesting.net']
settings in facebook developer apps
in app settings / basic
app settings->basic
app domains
add the top level domain and the full domain. should look like
drftesting.net
oauth.drftesting.net
go a little further down and click on the button that says "add platform"
Site URL
put the full site url in with "https"
https://oauth.drftesting.net/
under products
products->facebook login->configure (dropdown) -> settings
set Embedded Browser OAuth Login to yes
in Valid OAuth Redirect URIs add the callback url:
example url:
https://oauth.drftesting.net/accounts/facebook/login/callback/
######source on creating and setting up a facebook app configure facebook login
######django alluth doc on how to configure callback django allauth callback
how to get a test authentication token
https://developers.facebook.com/docs/marketing-apis/overview/authentication/