baloise / vue-keycloak

Keycloak plugin for Vue3 and Composition API
Apache License 2.0
71 stars 38 forks source link

Plugin install invokes keycloak init #13

Open Toilal opened 2 years ago

Toilal commented 2 years ago

The vue plugin install function automatically invokes init function, making the library hard to use when some routes of the application are available publicly without authentication, using check-sso mode.

Do you think it make sense to add an option to avoid this behavoir, and invoke init manually on keycloak instance ?

Toilal commented 2 years ago

I have implemented it in this commit https://github.com/Toilal/vue-keycloak/commit/f170c5c05351f8af9740d77553adfa42c620ff87, but it's based on my fork with vue2 support. Do you want me to open a pull request based on official master ?

yantxs commented 1 year ago

@Toilal, I have installed your implementation. Can you help me with some examples of how I can make some routes public?

Toilal commented 1 year ago

You have to manage not invoking the plugin on public routes.

yantxs commented 1 year ago

You have to manage not invoking the plugin on public routes.

Like this? Can you help with some example? @Toilal

image Ps: Ignore the wrong conditional