Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 777 Bytes

README.md

File metadata and controls

26 lines (16 loc) · 777 Bytes

Weapp Auth

Weapp auth is a Django app that helps to handle wechat mini program login and user info updating logic.

Quick start

  1. Install using pip pip install --upgrade django-weapp-auth

  2. Add "weapp_auth" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [ ... 'weapp_auth', ]

  3. Include the weapp_auth URLconf in your project urls.py like this::

    path('weapp_auth/', include('weapp_auth.urls')),

  4. Run python manage.py migrate to create the models.

  5. These two APIs are avaliable! weapp_auth/wechatLogin/ and weapp_auth/wechatUpdateUserInfo/

  6. Call these two APIs in your wechat mini app!

  7. Authenticate your request with from weapp_auth.authenticator.OpenIdAuthenticator import OpenIdAuthenticator