<p>And just like that I stumble over this wonderful blog post <a href="https://digitalevangelist.net/blog/vuejs-craft-cms-single-page-app-logging-in-to-craft" rel="nofollow noreferrer">https://digitalevangelist.net/blog/vuejs-craft-cms-single-page-app-logging-in-to-craft</a></p>

CC BY-SA 4.0
2019-07-19T13:16:25.273Z
2019-07-19T13:16:25.273Z
dmatthams
<p>I'm just diving into the world of javascript frameworks (late to the party I know) and can't figure out the missing piece of the authentication puzzle.</p>

<p>What is the preferred way to authenticate users from a Vue or any other javascript app running from element API? My Craft install and the app will be on separate domains.</p>

<p>Is it best to just push them to the craft install to log in then rely on sessions (is this secure?), or is there a preferred way? I have seen JWT's mentioned a few times, but guessing this will be tricky for a non-developer.</p>

<plugin-elementapi><security><authentication><vue>
Logging in to Craft via Vue/Javascript apps
# Logging in to Craft via Vue/Javascript apps

(Asked by: username_0 on 2019-07-19)

I'm just diving into the world of javascript frameworks (late to the party I know) and can't figure out the missing piece of the authentication puzzle.

What is the preferred way to authenticate users from a Vue or any other javascript app running from element API? My Craft install and the app will be on separate domains.

Is it best to just push them to the craft install to log in then rely on sessions (is this secure?), or is there a preferred way? I have seen JWT's mentioned a few times, but guessing this will be tricky for a non-developer.

**Tags:** plugin-elementapi, security, authentication, vue


---

## 1 answers

### Answer by username_0 on 2019-07-19. Score: 1 | Accepted answer

And just like that I stumble over this wonderful blog post <https://digitalevangelist.net/blog/vuejs-craft-cms-single-page-app-logging-in-to-craft>


---

