You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.
setup feathers in browser with an authenticate service... no server needed
use feathers-authentication-client to interact/login to your in browser service
Expected behavior
Login success messages
Actual behavior
System configuration
Here is the only file I modified main.js from the vue init webpack template
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
/** start feathers stuff **/
import feathers from 'feathers'
import memory from 'feathers-memory'
import auth from 'feathers-authentication-client'
import hooks from 'feathers-hooks'
// Create a feathers instance.
const app = feathers()
.configure(hooks())
// Configure feathers-authentication
.configure(auth({ secret: 'super secret' }))
.use('/users', memory())
.use('/authenticate', memory())
// Create a user that we can use to log in
var User = {
email: 'admin@feathersjs.com',
password: 'admin',
permissions: ['*']
}
app.service('users').create(User).then(user => {
console.log('Created default user', user)
}).catch(console.error)
debugger
app.service('authenticate').hooks({
before (create) {
console.log('auth created')
}
})
app.authenticate({
strategy: 'local',
email: 'admin@feathersjs.com',
password: 'admin'
})
.then(response => {
console.log('Authenticated!', response)
})
// Create an in-memory Feathers service with a default page size of 2 items
// and a maximum size of 4
app.use('/message', memory({
paginate: {
default: 2,
max: 4
}
}))
app.service('message').create({
text: 'Server message',
read: false
}).then(function (message) {
console.log('Created message', message)
})
/** end feathers stuff **/
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
template: '<App/>',
components: { App }
})
Module versions (especially the part that's not working):
feathers 2.2.0
feathers-authentication-client 0.3.3
NodeJS version:
8
Browser Version:
Chrome 61
Module Loader:
Webpack from Vue Webpack template
UPDATE:
The before Authenticate hook never fires... it just goes straight into the passport client connection error.
The text was updated successfully, but these errors were encountered:
FossPrime
changed the title
Client connection required, even when service is in browser
Client connection required, even when authenticate service is in browser
Sep 11, 2017
This has been fixed in Feathers v4 authentication. Please see the migration guide for more information. Closing this issue in order to archive this repository. Related issues can be opened at the new code location in the Feathers main repository.
Steps to reproduce
Expected behavior
Login success messages
Actual behavior
System configuration
Here is the only file I modified main.js from the
vue init webpack
templateModule versions (especially the part that's not working):
feathers 2.2.0
feathers-authentication-client 0.3.3
NodeJS version:
8
Browser Version:
Chrome 61
Module Loader:
Webpack from Vue Webpack template
UPDATE:
The before Authenticate hook never fires... it just goes straight into the passport client connection error.
The text was updated successfully, but these errors were encountered: