# How to Create a Vue Plugin

**URL:** <https://community.auth0.com/t/how-to-create-a-vue-plugin/53474>\
**Category:** Blog Discussions\
**Created:** [November 18, 2020, 8:40pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474 "2020-11-18T20:40:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan-auth0](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@dan-auth0](https://community.auth0.com/u/dan-auth0)\
**Post date:** [November 18, 2020, 8:40pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/1 "2020-11-18T20:40:51Z")

</div>

Learn how to create a Vue plugin to manage user authentication.

[Read on](https://auth0.com/blog/how-to-create-a-vue-plugin/)

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [November 25, 2020, 6:09pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/2 "2020-11-25T18:09:30Z")

</div>

I would love to level up my Vue skills! Please let us know when the article gets added 🙌

---

<div class="post-metadata">

**Author:** ![claude.faath](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/claude.faath/32/13280_2.png) [@claude.faath](https://community.auth0.com/u/claude.faath)\
**Post date:** [December 2, 2020, 4:13pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/3 "2020-12-02T16:13:17Z")

</div>

scorpion ~/TMP git clone -b starter [git@github.com](mailto:git@github.com):auth0-blog/auth0-vue-sample.gitClonage dans ‘auth0-vue-sample’…  
Permission denied (publickey).  
fatal: Unable to read remote repository.  
Please check that you have the access rights and that the repository exists.

scorpion ~/TMP git clone -b starter [GitHub - auth0-samples/auth0-vue-samples: Auth0 Integration Samples for Vue.js Applications](https://github.com/auth0-samples/auth0-vue-samples.git)  
Clonage dans ‘auth0-vue-samples’…  
fatal: The remote starter branch was not found in the origin upstream repository

---

<div class="post-metadata">

**Author:** ![dan-auth0](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@dan-auth0](https://community.auth0.com/u/dan-auth0)\
**Post date:** [December 2, 2020, 7:32pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/4 "2020-12-02T19:32:23Z")

</div>

Hello, Claude. This error may relate to your local SSH configuration. You can use this resource to set that up or verify that your configuration is correct:

> **[Connecting to GitHub with SSH - GitHub Docs](https://docs.github.com/en/authentication/connecting-to-github-with-ssh)**
>
> You can connect to GitHub using the Secure Shell Protocol (SSH), which provides a secure channel over an unsecured network.

As an alternative, you may also clone the repo using HTTPS or you may download the project from GitHub.

---

<div class="post-metadata">

**Author:** ![claude.faath](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/claude.faath/32/13280_2.png) [@claude.faath](https://community.auth0.com/u/claude.faath)\
**Post date:** [December 3, 2020, 7:23am UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/5 "2020-12-03T07:23:17Z")

</div>

Hello,  
Thanks, in the meantime I cloned the project and am working on it. Thanks, Claude.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 3, 2020, 9:55am UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/6 "2020-12-03T09:55:47Z")

</div>

Let us know if you have other questions down the road!

---

<div class="post-metadata">

**Author:** ![ChromaticRanger](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chromaticranger/32/25915_2.png) [@ChromaticRanger](https://community.auth0.com/u/ChromaticRanger)\
**Post date:** [December 3, 2020, 10:08am UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/7 "2020-12-03T10:08:43Z")

</div>

HI Dan

Thanks for the great content. Quick question. Do you have any plans to do this using Vue 3? I am relatively new to Vue (and Auth0) and want to use Vue 3 in my project.

Many thanks,  
Martin

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 3, 2020, 10:32am UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/8 "2020-12-03T10:32:39Z")

</div>

Maybe this article will be of any help:

> **[Getting Started with Vue 3: Composition API](https://auth0.com/blog/getting-started-with-vue-3-composition-api/)**
>
> Learn how to build a component with the new Composition API in Vue 3, why it was needed, and how it compares to the Options API

---

<div class="post-metadata">

**Author:** ![dan-auth0](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@dan-auth0](https://community.auth0.com/u/dan-auth0)\
**Post date:** [December 3, 2020, 2:37pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/9 "2020-12-03T14:37:01Z")

</div>

Hello, Martin! @holly and I are discussing what strategy we’d need to take for creating the same type of Plugin in Vue 3! Stay tuned for any news on this 🙂

---

<div class="post-metadata">

**Author:** ![ChromaticRanger](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chromaticranger/32/25915_2.png) [@ChromaticRanger](https://community.auth0.com/u/ChromaticRanger)\
**Post date:** [December 3, 2020, 3:45pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/10 "2020-12-03T15:45:42Z")

</div>

Thanks for the update Dan @dan-auth0. I will keep an eye out for any new content.

---

<div class="post-metadata">

**Author:** ![ChromaticRanger](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chromaticranger/32/25915_2.png) [@ChromaticRanger](https://community.auth0.com/u/ChromaticRanger)\
**Post date:** [December 3, 2020, 3:49pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/11 "2020-12-03T15:49:38Z")

</div>

Thanks Konrad @konrad.sopala. I’m just reading through the article now. It’s more generally about Vue3 and Vue2 differences, rather than how to integrate Auth0, but still a good worthwhile read for me, so thank you and @holly for writing it. 😃

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 3, 2020, 4:01pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/12 "2020-12-03T16:01:40Z")

</div>

Just wanted to help anyhow as I don’t have any experience with Vue 🙂

---

<div class="post-metadata">

**Author:** ![ChromaticRanger](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chromaticranger/32/25915_2.png) [@ChromaticRanger](https://community.auth0.com/u/ChromaticRanger)\
**Post date:** [December 23, 2020, 9:01pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/13 "2020-12-23T21:01:52Z")

</div>

Hi @dan-auth0  
Has there been any movement on this yet? I have a Vue3 Composition API project underway and would love to use Auth0 for Authentication services. I’ve tried various ways of trying to get the Vue2 version to work in my project but it’s been beyond me.  
Would be great for an update.  
Kind Regards,  
Martin

---

<div class="post-metadata">

**Author:** ![avishai](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/avishai/32/25334_2.png) [@avishai](https://community.auth0.com/u/avishai)\
**Post date:** [December 23, 2020, 9:26pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/14 "2020-12-23T21:26:47Z")

</div>

> [@Auth0 and Vue3 Quickstart?](https://community.auth0.com/t/auth0-and-vue3-quickstart/53151):
>
> Please include the following information in your post: Hey all. I’m trying to get the SPA Vue quickstart working with Vue3. I’m having issues with the app throwing a warning "export ‘default’ (imported as ‘Vue’) was not found in ‘vue’ that stops the app from loading. I think it’s related to the change is now .use is now tied to the app instance and not the Vue global. Anyone have a good link to some sample code showing how to get The SPA sdk working with the full Vue3 (not just the compos…

2 github repos there that implement auth0 plugin with vue3

---

<div class="post-metadata">

**Author:** ![ChromaticRanger](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chromaticranger/32/25915_2.png) [@ChromaticRanger](https://community.auth0.com/u/ChromaticRanger)\
**Post date:** [December 24, 2020, 11:20am UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/15 "2020-12-24T11:20:48Z")

</div>

Thanks for the link, but I had already seen those and could not get them to work. It is not super urgent for me at the moment as I have plenty of other tasks to do, so I’ll wait for an official method form Auth0 hopefully.

---

<div class="post-metadata">

**Author:** ![avishai](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/avishai/32/25334_2.png) [@avishai](https://community.auth0.com/u/avishai)\
**Post date:** [December 24, 2020, 10:53pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/16 "2020-12-24T22:53:52Z")

</div>

strange… if you try the vue2 examples, it won’t work, in the link i’ve posted, the are 2 commnets that link to github repos that actually work with vue3 (the plugin is written with composition api).  
i’ve managed to make it work… so if you need anyhelp just ask

---

<div class="post-metadata">

**Author:** ![ChromaticRanger](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chromaticranger/32/25915_2.png) [@ChromaticRanger](https://community.auth0.com/u/ChromaticRanger)\
**Post date:** [December 26, 2020, 3:58pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/17 "2020-12-26T15:58:29Z")

</div>

Hi @avishai

Thanks for the offer. I will go and take a look again at the referenced projects. Maybe I didnt try hard enough! From memory I think what I struggled with was converting what I found to Typescript. But hey, I’ll take another look and if I get stuck I’ll let you know.

---

<div class="post-metadata">

**Author:** ![ferlito.sergio](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ferlito.sergio/32/12949_2.png) [@ferlito.sergio](https://community.auth0.com/u/ferlito.sergio)\
**Post date:** [January 3, 2021, 10:59am UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/18 "2021-01-03T10:59:17Z")

</div>

Thanks! Very clear and interesting tutorial.  
Could I suggest a similar one but this time on  
**how set up and handle user roles in Auth0 + VUE**?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [January 4, 2021, 12:03pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/19 "2021-01-04T12:03:57Z")

</div>

Hey there @ferlito.sergio!

I just created an internal request for such content for our Content Team to advocate for your need!

---

<div class="post-metadata">

**Author:** ![dan-auth0](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@dan-auth0](https://community.auth0.com/u/dan-auth0)\
**Post date:** [January 4, 2021, 8:04pm UTC](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474/20 "2021-01-04T20:04:45Z")

</div>

Howdy, Martin! I was out on holiday vacation and I am back now. We don’t have any guidance yet on Vue 3 but I think the best path to implementation is through Vuex rather than a plugin. That’s what I was discussing internally. I’ll be working on another project so I’ll be passing the torch to someone to continue this research 🙂 We’ll keep this topic thread updated 👍

[Next page](https://community.auth0.com/t/how-to-create-a-vue-plugin/53474.md?page=2)
