email reset use port in dev
This commit is contained in:
@ -85,10 +85,16 @@ module.exports = function(User) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
User.on('resetPasswordRequest', function(info) {
|
User.on('resetPasswordRequest', function(info) {
|
||||||
|
let url;
|
||||||
const host = User.app.get('host');
|
const host = User.app.get('host');
|
||||||
// TODO(berks) get protocol as well
|
const { id: token } = info.accessToken;
|
||||||
const url = `http://${host}/reset-password?access_token=` +
|
if (process.env.NODE_ENV === 'development') {
|
||||||
info.accessToken.id;
|
const port = User.app.get('port');
|
||||||
|
url = `http://${host}:${port}/reset-password?access_token=${token}`;
|
||||||
|
} else {
|
||||||
|
url =
|
||||||
|
`http://${host}/reset-password?access_token=${token}`;
|
||||||
|
}
|
||||||
|
|
||||||
// the email of the requested user
|
// the email of the requested user
|
||||||
debug(info.email);
|
debug(info.email);
|
||||||
|
Reference in New Issue
Block a user