Login form previous log email remains

In an application that I have built I am using anvil’s built-in login form.

Everything works fine except for the fact that it sustains the previous email that has logged to the app when someone opens the login form, like on the image below. It seems like a placeholder at first but it is not.

The weird thing is that the last logged email might appear on different user browsers, hence I am concerned about the security issues. I do not want my users to see other user’s email.

Has anyone got any idea of why this is happening and how it can be resolved?

Welcome to the Forum!

Here’s a thought: does that still happen when “Remember me” is unchecked – or removed?

Hello!

Yes, it does…

I think you are pointing at Browser saving details and auto-filling them when you come back later.

By default, most browsers will automatically save the details you entered previously and enter them again when you return to the website.

Is that the case here?

1 Like

You could try with another browser to see if it’s a browser settings problem.

You could try with an incognito window to see if it’s a cookie problem.

1 Like

You can also toggle or modify this from the Users Service:

Left hand ribbon:
image

image

If this is toggled off and you are still seeing the same issue, then you can know it is probably a browser issue and not an inherent anvil issue.
(I mean you could be doing something with code, but if you don’t already know what that is, I doubt you are)

1 Like

Hi everyone, and thank for all your comments and time.

I have found, after @divyeshlakhotia suggestion, that my issue was a cookie issue after all.

The thing that I did to resolve this issue was to create a server function that clears the cookies.

@anvil.server.callable
def clear_cookies():
  anvil.server.cookies.local.clear()

Thanks again for your interest and your time!

2 Likes