diff --git a/README.md b/README.md index c6f66a8a1..3e8a8956c 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,14 @@ if (!AuthenticationState.authenticated) { } ``` +If you want to use the properties provided by Auth0 when you do not have access to the Vue instance, you can use the exported AuthenticationProperties. + +```js +import { AuthenticationProperties as auth0 } from 'vue-auth0-plugin'; + +const token = auth0.getTokenSilently(); +``` + ## AuthenticationGuard The plugin implements a Vue Router NavigationGuard to secure routes with Auth0. The example below shows how to use this AuthenticationGuard. diff --git a/src/index.ts b/src/index.ts index 029f166c9..98512815e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,4 +12,5 @@ export default { }; const AuthenticationState = Plugin.state; -export { AuthenticationGuard, AuthenticationState }; +const AuthenticationProperties = Plugin.properties; +export { AuthenticationGuard, AuthenticationState, AuthenticationProperties };