JoseGoncalves / vue-keycloak

Keycloak plugin for Vue 3 with Composition API
Apache License 2.0
11 stars 4 forks source link

Feature request: An option to not start authentication right away #9

Closed benny-noumena closed 4 months ago

benny-noumena commented 4 months ago

What about adding a flag and a way to start the authentication process when the page is rendered?

I think that would be a better UX.

Best

JoseGoncalves commented 4 months ago

I think that is achievable if you set 'check-sso' in the onLoad prop of the initOptionsobject. See: https://www.keycloak.org/docs/latest/securing_apps/#using-the-adapter After that you will need to call the login() method to initiate the authentication.

benny-noumena commented 4 months ago

Oh yes, you are right. For me I had a interceptor that did the login for me automatically. Thank you.