Add authentication to your Vue.js application in under 10 minutes using Kobble SDK.
@kobbleio/javascript
SDKCreate your vue.js application
Install @kobbleio/javascript
Initialize the SDK
src/kobble/index.ts
where you will initialize the SDK and export the Kobble instance.Setup the environment variables
.env
file at the root of your project and add the following environment variables.Create a callback handler
src/views/CallbackView.vue
.Use the Kobble client to handle the callback and redirect the user to the home page on page mount.Use the loginWithRedirect method
loginWithRedirect
method to redirect the user to the Kobble login page whenever we want to authenticate the user.For example with a simple button:Going further