You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AuthProvider needs to be added to the root component in an index.tsx, however the new @index.tsx doesmt seem to be the right place as its the main page ("/").
Also it suggest to add stuff to the routes.tsx file which also doesnt exist in the current starter.
I've added the AuthProvider to the @layout.tsx instead now since its the only logical place, which works for the most part, but inside the Layout file itself I am unable to use the auth login/logout methods aswell as aquiring the state directly unless I wrap those code snippets into their own components and inserting them into the layout instead.
Trying to e.g. logout results in an error "Uncaught Error: AuthContext not initialized" otherwise
Not sure if this is how its supposed to work (assuming I didnt do it wrong) but it should be noted in the docs
The text was updated successfully, but these errors were encountered:
The page for Authentication with SpringSecurity seems to be outdated, more specifically the Client-Side Security part
https://vaadin.com/docs/latest/hilla/guides/security/spring-login
The AuthProvider needs to be added to the root component in an index.tsx, however the new @index.tsx doesmt seem to be the right place as its the main page ("/").
Also it suggest to add stuff to the routes.tsx file which also doesnt exist in the current starter.
I've added the AuthProvider to the @layout.tsx instead now since its the only logical place, which works for the most part, but inside the Layout file itself I am unable to use the auth login/logout methods aswell as aquiring the state directly unless I wrap those code snippets into their own components and inserting them into the layout instead.
Trying to e.g. logout results in an error "Uncaught Error: AuthContext not initialized" otherwise
Not sure if this is how its supposed to work (assuming I didnt do it wrong) but it should be noted in the docs
The text was updated successfully, but these errors were encountered: