feat: password reset
This commit is contained in:
1 parent
f98a07ec8b
commit
ae733392f3
8 files changed
+478
-26
No files matched your search
@@ -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