feat: password reset
This commit is contained in:
@@ -137,6 +137,19 @@ module.exports = {
|
||||
return graphHelper.generateError(err)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Perform Mandatory Password Change after Login
|
||||
*/
|
||||
async forgotPassword (obj, args, context) {
|
||||
try {
|
||||
await WIKI.models.users.loginForgotPassword(args, context)
|
||||
return {
|
||||
responseResult: graphHelper.generateSuccess('Password reset request processed.')
|
||||
}
|
||||
} catch (err) {
|
||||
return graphHelper.generateError(err)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Register a new account
|
||||
*/
|
||||
|
@@ -52,6 +52,10 @@ type AuthenticationMutation {
|
||||
newPassword: String!
|
||||
): AuthenticationLoginResponse @rateLimit(limit: 5, duration: 60)
|
||||
|
||||
forgotPassword(
|
||||
email: String!
|
||||
): DefaultResponse @rateLimit(limit: 3, duration: 60)
|
||||
|
||||
register(
|
||||
email: String!
|
||||
password: String!
|
||||
|
Reference in New Issue
Block a user