API endpoints

Basic

  • /rest-auth/login/ (POST)

    • username
    • email
    • password

    Returns Token key

  • /rest-auth/logout/ (POST)

    Note

    ACCOUNT_LOGOUT_ON_GET = True to allow logout using GET - this is the exact same configuration from allauth. NOT recommended, see: http://django-allauth.readthedocs.io/en/latest/views.html#logout

  • /rest-auth/password/reset/ (POST)

    • email
  • /rest-auth/password/reset/confirm/ (POST)

    • uid
    • token
    • new_password1
    • new_password2

    Note

    uid and token are sent in email after calling /rest-auth/password/reset/

  • /rest-auth/password/change/ (POST)

    • new_password1
    • new_password2
    • old_password

    Note

    OLD_PASSWORD_FIELD_ENABLED = True to use old_password.

    Note

    LOGOUT_ON_PASSWORD_CHANGE = False to keep the user logged in after password change

  • /rest-auth/user/ (GET, PUT, PATCH)

    • username
    • first_name
    • last_name

    Returns pk, username, email, first_name, last_name

Registration

  • /rest-auth/registration/ (POST)

    • username
    • password1
    • password2
    • email
  • /rest-auth/registration/verify-email/ (POST)

    • key

Social Media Authentication

Basing on example from installation section Installation