Reputation: 1853
I've set up my Django social auth according to the documentation. With the following:
GOOGLE_OAUTH_EXTRA_SCOPE = ['https://www.googleapis.com/auth/calendar']
GOOGLE_OAUTH2_CLIENT_ID = *client id here*
GOOGLE_OAUTH2_CLIENT_SECRET = *client secret here*
In the API console, I have set it to a web application with the Redirect URI as omab says:
http://localhost:8000/complete/google-oauth2/
In my template I have:
<a href="{% url socialauth_begin 'google' %}" class="google_login_button">Login with Google </a>
However, when I test the application the oAuth doesn't ask for "calendar permissions", just the default email ones.
What am I missing??
Upvotes: 2
Views: 992
Reputation: 1201
To save someone using the new python-social-auth and django > 1.4
Use this :
{% url 'social:begin' 'twitter' %}
Upvotes: 1
Reputation: 1853
After some searching, it was a silly mistake. The link should be:
{% url socialauth_begin 'google-oauth2' %}
I misinterpreted the documentation when it said write in the name of whatever is in the backend.
Hope this helps future people.
Upvotes: 2