Users schema
See original GitHub issueI was migrating the users service to use mysql as backend db.
const sequelize = new Sequelize('test_db', 'root', 'root', {
host: 'localhost', dialect: 'mysql'
})
const User = sequelize.define('users', {
username: {
type: Sequelize.STRING,
allowNull: false
},
email: {
type: Sequelize.STRING,
allowNull: false
},
password: {
type: Sequelize.STRING,
allowNull: false
},
roles: {
type: Sequelize.STRING,
allowNull: true
},
isVerified: {
type: Sequelize.BOOLEAN,
allowNull: true
},
verifyExpires: {
type: Sequelize.STRING,
allowNull: true
},
verifyToken: {
type: Sequelize.STRING,
allowNull: true
}
})
const options = {
Model: User,
paginate: {
default: 5,
max: 25
}
}
// Initialize our service with any options it requires
app.use('/users', service(options));
// Get our initialize service to that we can bind hooks
const userService = app.service('/users');
// Set up our before hooks
userService.before(hooks.before(app));
// Set up our after hooks
userService.after(hooks.after);
It saves properly, but whenever i login a user an error occured
Uncaught TypeError: Cannot read property 'isVerified' of undefined
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
oracle - Difference between database vs user vs schema
In Oracle, users and schemas are essentially the same thing. You can consider that a user is the account you use to connect...
Read more >Difference between a user and a schema in Oracle?
A schema is collection of database objects, including logical structures such as tables, views, sequences, stored procedures, synonyms, indexes, ...
Read more >The Difference between User and Schema in Oracle - Oratable
an Oracle user is a database account with login access to the database; an Oracle schema is an Oracle user plus the collection...
Read more >Ownership and user-schema separation in SQL Server
User -schema separation allows for more flexibility in managing database object permissions. A schema is a named container for database objects, ...
Read more >Creating users and schemas for SQL Server databases - IBM
The user must be mapped to the master database with the SqlJDBCXAUser role. Important: In Microsoft SQL server, the default schema name associated...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Setting idField option to id in:
.configure(authentication({idField: 'id'}))
solved the issue.In update functions inside this file: https://github.com/eddyystop/feathers-service-verify-reset/blob/ae1f1dda0aef5785343286be54378d3ed4526b3e/src/index.js
v0.4.7