Vue

npm create feathersdev@latest app --framework vue --app-id "<your-app-id>"

Initialization

In your VueJS application, create a src/auth.ts file that allows to make authenticated requests to the backend like this:

auth.ts

This file exports an authFetch function that can be used just like the normal fetch API and will redirect to the login page if the user needs to log in.

Usage

A VueJS component using this function to load the message from one of the platform example servers looks like this:

App.vue

You can find the full Vite + Vue example application here.

Subscribe to our NewsletterGet new Feathers content as it becomes available.
Feathers.dev

Copyright © 2012 - 2025 feathers.dev