Code - "Clear remembered login"

Is it possible to code “Clear remembered login” without using the UI in the Users Service?
Thanks so much

Unfortunately, this doesn’t work for my use case:

clear

Not tested it out but clearing the cookies might work


anvil.server.cookies.local.clear()

@Tony.Nguyen Absolutely! Just delete the contents of the remembered_logins field for that user. Something like this:

u = app_tables.users.get(email="someone@somewhere.com")
u['remembered_logins'] = None
1 Like

Oh yeah… Why didn’t it come to me? :stuck_out_tongue_winking_eye:

It is really simple, thanks for that @daviesian

@divyeshlakhotia appreciate for the help as well

1 Like