DAVIDhaker / django-sso

https://pypi.org/project/django-sso/
27 stars 12 forks source link

Adding MFA and also ADDITIONAL FIELDS #17

Open programmerizak opened 1 year ago

programmerizak commented 1 year ago

This is not really an issue but i just need support on it

  1. How can i be able to connect MFA(Multi Factor Authentication) to the login, to enhance user security
  2. Am not getting additional fields in my services project set in ADDITIONAL_FIELDS variable in my settings.py
DAVIDhaker commented 1 year ago

Hello!

  1. I will look into this possibility and ways of realization and get back to you a little later.
  2. Need more details to explore problem.
programmerizak commented 1 year ago

Thanks sir am grateful

Hello!

  1. I will look into this possibility and ways of realization and get back to you a little later.
  2. Need more details to explore problem.

Thanks sir am grateful

DAVIDhaker commented 1 year ago
  1. What libraries are you using or wanna to use for MFA?
  2. I am waiting for more details if problem is not solved.
programmerizak commented 1 year ago
  1. I actually like to use Kagi for the MFA, or i can also use django-mfa3
  2. In my Gateway Website settings.py i have ` INSTALLED_APPS += 'django_sso.sso_gateway',

SSO settings section in the gateway side are optional

SSO = {

Timeout for the communication with subordinated services. (OPTIONAL)

# This timeout is defined in seconds with a default value of 0.1s 
# (100ms) per registered service.
'SUBORDINATE_COMMUNICATION_TIMEOUT': 0.1,

# Additional fields. (OPTIONAL). For more details look to part
# named as "Send additional data to subordinated services"
'ADDITIONAL_FIELDS': ('first_name', 'last_name', 'phone_number'),

} `

In one of my service website settings.py i have this

` INSTALLED_APPS += 'django_sso.sso_service',

SSO = {

Specify SSO server base url (REQUIRED)

'ROOT': 'domain.com',

# Specify application token obtained in the SSO server admin panel (REQUIRED)
'TOKEN': 'token_from_gateway',

}

`

My Question is that from my service app, how can i get the user first_name, last_name and phone_number, its only the user email am getting. When i do request.user.email in the template or view in my service app, it return nothing, but request.user.username return the user email. But am looking for how to get the First Name, Last Name and Phone Number

programmerizak commented 11 months ago

Just want to add, can one use this for a production ready website now, or should we wait for update ?