Comments (3)
For the time being I have written the following code in the login function in auth.service.js,
var [err, foundUser] = await to( auth.__authenticate(user) )
if (foundUser.isVerified == false) {
err = {message: "Verify your Email Address"};
}
And changed this line
return auth.currentUser
to this, in the signup function
return false
Is this an acceptable approach?
from feathers-vue.
You can always use the isVerified()
hook.
verifyHooks.isVerified()
Use it on the before
create
authentication
service in the authentication.js file.
Here's the library you import
const verifyHooks = require('feathers-authentication-management').hooks;
Some people may want users to be able to login without being verified or perhaps only be able to do limited tasks while unverified.
The only other change you'll need to make is taking out the portion of the auth.service.js
in the signup
method that automatically calls login after creating a user and change the notification.
from feathers-vue.
Ok. I'll try that.
Thanks
from feathers-vue.
Related Issues (11)
- Npm run serve Failed HOT 5
- FYI install and yarn dev warnings
- Unable to create any service on top of your repo,, Error: Cannot read property 'call' of undefined HOT 5
- pug is not a loader error, new routes not generating
- realtime HOT 4
- Couldn't find env file HOT 2
- Authentication via REST? HOT 2
- REST services documentation HOT 3
- Please make it possible to use with other DB backends HOT 2
- Make the cordova branch framework agnostic HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feathers-vue.