@Anonymous not working

Hi everyone, I hope you’re doing well. I’m starting with Vaadin and I don’t get it well cause I don’t have knowledge in Spring boot. It’s my first time to use Java for web development.

I’m facing a difficulty with the @AnonymousAllowed annotation. I used the standard configuration Java class provided in the documentation for configuring Spring boot security. Each time I try to visit a view annotated with @AnonymousAllowed, it redirect me to the login page. I don’t know if it’s the annotation the problem or the configuration class.

I’m using the Vaadin 24.9+.

Thank you for your help and time that you will take to answer me.

Just a wild guess: Your view annotated with AnonymousAllowed has a parent layout (directly or indirectly through @Layout) which is not allowed for Anonymous. You could try to add autoLayout=false to your Route annotation.

1 Like

Yes, indeed the view has a parent layout and that was the problem. Thank you very much for your help and time.