Skip to content

Commit

Permalink
Fix facebook integration in example project
Browse files Browse the repository at this point in the history
  • Loading branch information
st4lk committed Jan 1, 2020
1 parent b8143af commit 460efc0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,12 +509,22 @@ There is an [example project](https://github.com/st4lk/django-rest-social-auth/t
- run development server

```bash
PYTHONPATH='../' python manage.py runserver
PYTHONPATH='../' python manage.py runsslserver
```

`runsslservier` is used instead of built-in `runserver` to serve the project with TLS (aka SSL) certificate.
HTTPS is required by some social providers (facebook), without it they won't work.
The certificate will not be trusted by your system - that is expected.
Just tell your browser to proceed with this untrusted certificate - it is acceptable for development purposes.

In Chrome browser it can look like this:
- step 1: [image](https://user-images.githubusercontent.com/1771042/71641969-90ab7280-2cd6-11ea-95ed-de4c6e123345.png)
- step 2: [image](https://user-images.githubusercontent.com/1771042/71641970-91440900-2cd6-11ea-9275-f6c351ddc543.png)

Example project already contains facebook, google and twitter app ids and secrets.
These apps are configured to work only with http://127.0.0.1:8000/ domain. Google and Facebook providers support http://localhost:8000/ as well. But Twitter only support 127.0.0.1.
So, to play with it, visit http://127.0.0.1:8000/
These apps are configured to work only with 127.0.0.1:8000 domain. Google and Facebook providers support localhost:8000 as well. But Twitter only support 127.0.0.1.

So, to play with it, visit https://127.0.0.1:8000/

Example project uses [satellizer](https://github.com/sahat/satellizer) angularjs module.

Expand Down
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ rest_social_auth release notes

master
------
- Fix facebook integration in example project: serve with fake TLS certificate

v2.2.0
------
Expand Down
1 change: 1 addition & 0 deletions example_project/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
'rest_framework.authtoken',
'social_django',
'rest_social_auth',
'sslserver', # some social providers require https
# 'knox', # For django-rest-knox

'users',
Expand Down

0 comments on commit 460efc0

Please sign in to comment.