Closed trijpstra-fourlights closed 1 year ago
I added a composable to the plugin.
While it's a preference, IMO it allows for slightly cleaner code while using this module. Furthermore, having it in allows the developer to choose how to interact with the module.
e.g.
const { login } = useOidc() await login('/secure')
instead of
const { $oidc } = useNuxtApp() await $oidc.login('/secure')
or
const { $oidc: { login } } = useNuxtApp() await login('/secure')
Nice work, thanks a lot!
I added a composable to the plugin.
While it's a preference, IMO it allows for slightly cleaner code while using this module. Furthermore, having it in allows the developer to choose how to interact with the module.
e.g.
instead of
or