My template:
{{ backends.associated }}
{{ backends.not_associated }}
{{ backends.backends }}
{{ status_page }}
{% if page_status == 'login' %}
{% for soc in backends.backends %}
<form action="{% url 'social:disconnect' soc %}" method="post">
{% csrf_token %}
<button type="submit">Disconnect</button>
</form>
{% endfor %}
{% endif %}
{% if page_status == 'start' %}
<p>Стартовая страница</p>
{% for soc in backends.backends %}
<a href="{% url 'social:begin' soc %}">{{ soc }}</a>
{% endfor %}
{% endif %}
I can log in Steam. But I can't to disconnect. I tryed everything. Error:
NotAllowedToDisconnect at /disconnect/steam/
No exception message supplied
Request Method: POST
Request URL: https://sheltered-sea-35879.herokuapp.com/disconnect /steam/
Django Version: 1.9.7
Exception Type: NotAllowedToDisconnect
Exception Location: /app/.heroku/python/lib/python3.5/site-packages /social/pipeline/disconnect.py in allowed_to_disconnect, line 7
Python Executable: /app/.heroku/python/bin/python
Python Version: 3.5.2
After this error I have to logout from steam. I can't find information in docs.
All your code is doing is disassociating your steam account from your local django user, not disconnecting from steam as such. If you're really trying to disconnect from steam, there's no need, all that's happened when you executed the social:begin link is that a steam supplied token was associated with your local django user which will be used next time you log in to the django site. You aren[t currently connected to steam.
PSA will only allow you to disassociate a social account if the django user would still be possible to login afterwards (i.e. it has a password defined for the user or is still associated with another social media account)