OK, Your suggestion is to search in examples of web2py and github ?

Regards


niedziela, 31 stycznia 2021 o 03:48:08 UTC+1 [email protected] napisaƂ(a):

> I thought I must have seen an example of the same from github or Web2py 
> examples.
> Regards 
>
> On Sun, Jan 31, 2021, 02:47 'brushek' via web2py-users <
> [email protected]> wrote:
>
>>
>> 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
>>
>>
>> -- 
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/a22212bc-d6ef-4e97-907f-d7e2a7ff7b3dn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/web2py/a22212bc-d6ef-4e97-907f-d7e2a7ff7b3dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/23a3c3e7-8495-4c4b-8108-efd5a9f1ebd1n%40googlegroups.com.

Reply via email to