# Authenticating Svelte Applications

**URL:** <https://community.auth0.com/t/authenticating-svelte-applications/54819>\
**Category:** Blog Discussions\
**Created:** [December 14, 2020, 6:37pm UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819 "2020-12-14T18:37:33Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertino.calcaterra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/robertino.calcaterra/32/66825_2.png) [@robertino.calcaterra](https://community.auth0.com/u/robertino.calcaterra)\
**Post date:** [December 14, 2020, 6:37pm UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/1 "2020-12-14T18:37:33Z")

</div>

Learn how to create a Svelte application and add authentication.  
**[Read more…](https://auth0.com/blog/authenticating-svelte-apps/)**

Brought for you by one of our Guest Author: **Fikayo Adepoju** @coderonfleek

 ![Authenticating Svelte Applications](https://global.discourse-cdn.com/auth0/original/3X/2/0/206365374af4289cf54cfb09cdbdc3f1f3f18922.jpeg)

---

<div class="post-metadata">

**Author:** ![robertino.calcaterra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/robertino.calcaterra/32/66825_2.png) [@robertino.calcaterra](https://community.auth0.com/u/robertino.calcaterra)\
**Post date:** [December 14, 2020, 8:26pm UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/2 "2020-12-14T20:26:26Z")

</div>

How did you like this post? Please share any comments or feedback with us on this thread

---

<div class="post-metadata">

**Author:** ![over.run](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/over.run/32/14833_2.png) [@over.run](https://community.auth0.com/u/over.run)\
**Post date:** [December 31, 2020, 12:09am UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/3 "2020-12-31T00:09:24Z")

</div>

This is great, super helpful, except… I’m getting rollup errors, trying to use the library.

```
[!] (plugin commonjs) SyntaxError: Unexpected token (15:9794) in {...}\node_modules\@auth0\auth0-spa-js\dist\auth0-spa-js.production.esm.js

```

I’m not really familiar with rollup, so, I’m stumped. … loading the script straight from the CDN works, so, I’m just gonna go with that for now. 🤷‍♀️

---

<div class="post-metadata">

**Author:** ![fikfikky](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/fikfikky/32/28820_2.png) [@fikfikky](https://community.auth0.com/u/fikfikky)\
**Post date:** [January 1, 2021, 12:36am UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/4 "2021-01-01T00:36:21Z")

</div>

Hi. Thanks for pointing this out, can you please describe the point where you started getting this error so we can investigate further. Thanks

---

<div class="post-metadata">

**Author:** ![AntSmithCode](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/antsmithcode/32/27063_2.png) [@AntSmithCode](https://community.auth0.com/u/AntSmithCode)\
**Post date:** [January 20, 2021, 10:22am UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/6 "2021-01-20T10:22:18Z")

</div>

Great tutorial!

Working on a project to switch bootstrap to Tailwind.

I was wondering did we need to create a file named TaskList.svelte?

I didn’t see it inside the repository, but it was mentioned in the tutorial.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/8/7/8794afb71b86cf322d2978829782aad4d278e1ab.png)

---

<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 20, 2021, 11:39am UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/7 "2021-01-20T11:39:06Z")

</div>

Tagging @fikfikky @coderonfleek for better visibility

---

<div class="post-metadata">

**Author:** ![fikfikky](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/fikfikky/32/28820_2.png) [@fikfikky](https://community.auth0.com/u/fikfikky)\
**Post date:** [January 20, 2021, 5:57pm UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/8 "2021-01-20T17:57:12Z")

</div>

Yes. At the beginning of the “Building the Task List” section, a TaskList.svelte file was created.

---

<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 21, 2021, 12:52pm UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/9 "2021-01-21T12:52:13Z")

</div>

Thanks for the follow-up!

---

<div class="post-metadata">

**Author:** ![StaringSkyward](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/staringskyward/32/12776_2.png) [@StaringSkyward](https://community.auth0.com/u/StaringSkyward)\
**Post date:** [January 29, 2021, 11:25am UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/10 "2021-01-29T11:25:20Z")

</div>

This is a great tutorial and timely for me as I am looking at building my first Svelte app with authentication.

One suggestion: since pop-ups are problematic for so many people how about a `loginWithRedirect` style flow instead?

---

<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 29, 2021, 12:15pm UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/11 "2021-01-29T12:15:50Z")

</div>

Tagging @coderonfleek (the article author) for better visibility of that feature request @StaringSkyward

---

<div class="post-metadata">

**Author:** ![StaringSkyward](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/staringskyward/32/12776_2.png) [@StaringSkyward](https://community.auth0.com/u/StaringSkyward)\
**Post date:** [January 29, 2021, 12:26pm UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/12 "2021-01-29T12:26:40Z")

</div>

I will try to get a working example and submit a PR to the github repo. I’m a beginner with Svelte so I’m not sure of my code quality but I will give it a go.

---

<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 29, 2021, 12:27pm UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/13 "2021-01-29T12:27:17Z")

</div>

Perfect! Give it a go and share the link to the PR once you have it!

---

<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:** [February 26, 2021, 8:27pm UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/14 "2021-02-26T20:27:56Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

---

<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 3, 2022, 5:48pm UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/15 "2022-01-03T17:48:16Z")

</div>



---

<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 3, 2022, 5:48pm UTC](https://community.auth0.com/t/authenticating-svelte-applications/54819/16 "2022-01-03T17:48:20Z")

</div>

If you are looking for examples on how to use Auth0 with Svelte, please check out the following code samples 🙂

> **[Svelte Code Samples: SPA Security in Action](https://developer.auth0.com/resources/code-samples/spa/svelte)**
>
> Learn how to add user authentication to Svelte applications built with JavaScript using open-source code samples. Learn how to secure Svelte apps.
