Thanks Carlos I couldnt find the login_user() function in the book but i did find it here: https://web2py.readthedocs.io/en/latest/_modules/gluon/tools.html#Auth.login_user
Does login_user(self, user) essentially bypass the normal authentication process? And is login_bare(self, username, password) the normal login function? Andrew ___________________________ *www.TenOutOfTen.org* <https://www.TenOutOfTen.org> rogers...@gmail.com (+95) 09 250018669 (Myanmar) On Wed, 18 Nov 2020 at 21:26, Carlos Correia <car...@memoriapersistente.pt> wrote: > On 17/11/20 22:24, Kenneth wrote: > > Hi, > > I tried searching the discussions but could not find anything like this > being discussed. > > I'm looking into having users login into my app via an link/URL they > receive via email. They just get an link no separate username and password. > When the link is accessed they are logged in normally. The link would look > like something like this: my.website.com/longhash4324kljhasdfasd9f87ads > > Does web2py already contain this function? > > > Kenneth > > -- > 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 web2py+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/e8102d90-88c8-4a4c-abcb-96ba7aa54cddn%40googlegroups.com > <https://groups.google.com/d/msgid/web2py/e8102d90-88c8-4a4c-abcb-96ba7aa54cddn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > Hi, > > I would write the hash somewhere in the filesystem, create a controller to > verify the hash, then use Auth.login_user() to authenticate the user. > > Having said that, please note that it is a (very) bad idea, since a "man > in the middle" could easily intercept the mail and hack the session. > > Regards, > > Carlos Correia > ========================= > MEMÓRIA PERSISTENTE > GSM: 917 157 146 (Signal, WhatsApp) > e-mail: ge...@memoriapersistente.pt > URL: http://www.memoriapersistente.pt > XMPP (Jabber): car...@memoriapersistente.pt > > -- > 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 web2py+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/00b9aa90-1458-f9c5-ae9b-703e740341d7%40memoriapersistente.pt > <https://groups.google.com/d/msgid/web2py/00b9aa90-1458-f9c5-ae9b-703e740341d7%40memoriapersistente.pt?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 web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CACWMBMNZceg2jNsMGym4i0bip1VCAZQjRZ2Yjc0n-XkZMRad7Q%40mail.gmail.com.