"Django Toyo Auth" offers providers of Toyo University Accounts(@toyo.jp) and INIAD Accounts(@iniad.org) for django-allauth
pip install django-toyo-auth
INSTALLED_APPS = [
...
'django.contrib.auth',
'django.contrib.messages',
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
'django_toyo_auth',
'django_toyo_auth.providers.iniad', # INIAD Account
'django_toyo_auth.providers.toyo', # Toyo Account
...
]
SITE_ID = 1
# Provider specific settings
SOCIALACCOUNT_PROVIDERS = {
'iniad': { # for INIAD Account
'SCOPE': [
'profile',
'email',
],
'AUTH_PARAMS': {
'access_type': 'online',
},
},
'toyo': { # for Toyo Account
'SCOPE': [
'profile',
'email',
],
'AUTH_PARAMS': {
'access_type': 'online',
},
},
}
urlpatterns = [
...
path('accounts/', include('allauth.urls')),
...
]
User class with student_id, entry_year, is_student, is_toyo_member, is_iniad_member
- student_id
- entry_year
- is_student
- is_toyo_member
- is_iniad_member
- grade
Inherits all attributes and methods from AbstractUser, but also primary_key is UUID
- uuid
ModelAdmin class for AbstractUser. It offers user-friendly admin pages.
ModelAdmin class for UUIDAbstractUser. It offers user-friendly admin pages.
It offers only providers and custom models for django-allauth. Please see django-allauth documents for detail
MIT