diff --git a/share/templates/readmes/drf_authorization_facebook.md b/share/templates/readmes/drf_authorization_facebook.md new file mode 100644 index 0000000..454dba0 --- /dev/null +++ b/share/templates/readmes/drf_authorization_facebook.md @@ -0,0 +1,56 @@ +## 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](https://stackoverflow.com/questions/55666103/django-allauth-facebook-integration-login-failure) + + 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](https://help.sharetribe.com/en/articles/666072-configure-facebook-login) + +######django alluth doc on how to configure callback + [django allauth callback](https://django-allauth.readthedocs.io/en/latest/socialaccount/providers/index.html?highlight=callback) + + + +