Hello,
I have two problems to solve, I think they are simple, but couldn't find proper solution in docs.
I would like to show qrcode generated by qrcode module which will be used for Google Authenticator for every user after proper registration. This qrcode should be generated randomly and inserted into database. I don't wont (now) to allow edit this field by users in profile and in registration form.
I added this field this way:
#Before define tables, we add some extra field to auth_user
auth.settings.extra_fields['auth_user'] = [
Field('motp_secret', 'password', length=512, default='', label='MOTP Secret',requires = IS_STRONG(min=16,max=16,special=0,lower=0,number=3,upper=13)),
]
but this way this field is seen by user in registration form and profile editing. I would like to generate this secret and insert into database, but without possibility to edit this by user, and give him (only once) AFTER registration qrcode to scan with information, that he/she won't be allowed to login if doesn't scan qrcode and add it Google authenticator.
So questions :)
1. How to redirect after proper registration to some page on which will be custom message with qrcode ?
2. How to add silently this motp_secret field to database during registration of new user without his interaction/knowing about it
Regards
brushek