UserController.js 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = exports.UserController = void 0;
  6. var _cryptoUtils = require("../cryptoUtils");
  7. var _triggers = require("../triggers");
  8. var _AdaptableController = _interopRequireDefault(require("./AdaptableController"));
  9. var _MailAdapter = _interopRequireDefault(require("../Adapters/Email/MailAdapter"));
  10. var _rest = _interopRequireDefault(require("../rest"));
  11. var _node = _interopRequireDefault(require("parse/node"));
  12. var _AccountLockout = _interopRequireDefault(require("../AccountLockout"));
  13. var _Config = _interopRequireDefault(require("../Config"));
  14. function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
  15. function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
  16. function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
  17. function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
  18. function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
  19. function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
  20. var RestQuery = require('../RestQuery');
  21. var Auth = require('../Auth');
  22. class UserController extends _AdaptableController.default {
  23. constructor(adapter, appId, options = {}) {
  24. super(adapter, appId, options);
  25. }
  26. get config() {
  27. return _Config.default.get(this.appId);
  28. }
  29. validateAdapter(adapter) {
  30. // Allow no adapter
  31. if (!adapter && !this.shouldVerifyEmails) {
  32. return;
  33. }
  34. super.validateAdapter(adapter);
  35. }
  36. expectedAdapterType() {
  37. return _MailAdapter.default;
  38. }
  39. get shouldVerifyEmails() {
  40. return (this.config || this.options).verifyUserEmails;
  41. }
  42. async setEmailVerifyToken(user, req, storage = {}) {
  43. const shouldSendEmail = this.shouldVerifyEmails === true || typeof this.shouldVerifyEmails === 'function' && (await Promise.resolve(this.shouldVerifyEmails(req))) === true;
  44. if (!shouldSendEmail) {
  45. return false;
  46. }
  47. storage.sendVerificationEmail = true;
  48. user._email_verify_token = (0, _cryptoUtils.randomString)(25);
  49. if (!storage.fieldsChangedByTrigger || !storage.fieldsChangedByTrigger.includes('emailVerified')) {
  50. user.emailVerified = false;
  51. }
  52. if (this.config.emailVerifyTokenValidityDuration) {
  53. user._email_verify_token_expires_at = _node.default._encode(this.config.generateEmailVerifyTokenExpiresAt());
  54. }
  55. return true;
  56. }
  57. async verifyEmail(username, token) {
  58. if (!this.shouldVerifyEmails) {
  59. // Trying to verify email when not enabled
  60. // TODO: Better error here.
  61. throw undefined;
  62. }
  63. const query = {
  64. username: username,
  65. _email_verify_token: token
  66. };
  67. const updateFields = {
  68. emailVerified: true,
  69. _email_verify_token: {
  70. __op: 'Delete'
  71. }
  72. };
  73. // if the email verify token needs to be validated then
  74. // add additional query params and additional fields that need to be updated
  75. if (this.config.emailVerifyTokenValidityDuration) {
  76. query.emailVerified = false;
  77. query._email_verify_token_expires_at = {
  78. $gt: _node.default._encode(new Date())
  79. };
  80. updateFields._email_verify_token_expires_at = {
  81. __op: 'Delete'
  82. };
  83. }
  84. const maintenanceAuth = Auth.maintenance(this.config);
  85. var findUserForEmailVerification = await RestQuery({
  86. method: RestQuery.Method.get,
  87. config: this.config,
  88. auth: maintenanceAuth,
  89. className: '_User',
  90. restWhere: {
  91. username
  92. }
  93. });
  94. return findUserForEmailVerification.execute().then(result => {
  95. if (result.results.length && result.results[0].emailVerified) {
  96. return Promise.resolve(result.results.length[0]);
  97. } else if (result.results.length) {
  98. query.objectId = result.results[0].objectId;
  99. }
  100. return _rest.default.update(this.config, maintenanceAuth, '_User', query, updateFields);
  101. });
  102. }
  103. checkResetTokenValidity(username, token) {
  104. return this.config.database.find('_User', {
  105. username: username,
  106. _perishable_token: token
  107. }, {
  108. limit: 1
  109. }, Auth.maintenance(this.config)).then(results => {
  110. if (results.length != 1) {
  111. throw 'Failed to reset password: username / email / token is invalid';
  112. }
  113. if (this.config.passwordPolicy && this.config.passwordPolicy.resetTokenValidityDuration) {
  114. let expiresDate = results[0]._perishable_token_expires_at;
  115. if (expiresDate && expiresDate.__type == 'Date') {
  116. expiresDate = new Date(expiresDate.iso);
  117. }
  118. if (expiresDate < new Date()) throw 'The password reset link has expired';
  119. }
  120. return results[0];
  121. });
  122. }
  123. async getUserIfNeeded(user) {
  124. var where = {};
  125. if (user.username) {
  126. where.username = user.username;
  127. }
  128. if (user.email) {
  129. where.email = user.email;
  130. }
  131. var query = await RestQuery({
  132. method: RestQuery.Method.get,
  133. config: this.config,
  134. runBeforeFind: false,
  135. auth: Auth.master(this.config),
  136. className: '_User',
  137. restWhere: where
  138. });
  139. const result = await query.execute();
  140. if (result.results.length != 1) {
  141. throw undefined;
  142. }
  143. return result.results[0];
  144. }
  145. async sendVerificationEmail(user, req) {
  146. if (!this.shouldVerifyEmails) {
  147. return;
  148. }
  149. const token = encodeURIComponent(user._email_verify_token);
  150. // We may need to fetch the user in case of update email; only use the `fetchedUser`
  151. // from this point onwards; do not use the `user` as it may not contain all fields.
  152. const fetchedUser = await this.getUserIfNeeded(user);
  153. let shouldSendEmail = this.config.sendUserEmailVerification;
  154. if (typeof shouldSendEmail === 'function') {
  155. var _req$auth;
  156. const response = await Promise.resolve(this.config.sendUserEmailVerification({
  157. user: _node.default.Object.fromJSON(_objectSpread({
  158. className: '_User'
  159. }, fetchedUser)),
  160. master: (_req$auth = req.auth) === null || _req$auth === void 0 ? void 0 : _req$auth.isMaster
  161. }));
  162. shouldSendEmail = !!response;
  163. }
  164. if (!shouldSendEmail) {
  165. return;
  166. }
  167. const username = encodeURIComponent(fetchedUser.username);
  168. const link = buildEmailLink(this.config.verifyEmailURL, username, token, this.config);
  169. const options = {
  170. appName: this.config.appName,
  171. link: link,
  172. user: (0, _triggers.inflate)('_User', fetchedUser)
  173. };
  174. if (this.adapter.sendVerificationEmail) {
  175. this.adapter.sendVerificationEmail(options);
  176. } else {
  177. this.adapter.sendMail(this.defaultVerificationEmail(options));
  178. }
  179. }
  180. /**
  181. * Regenerates the given user's email verification token
  182. *
  183. * @param user
  184. * @returns {*}
  185. */
  186. async regenerateEmailVerifyToken(user, master, installationId, ip) {
  187. const {
  188. _email_verify_token
  189. } = user;
  190. let {
  191. _email_verify_token_expires_at
  192. } = user;
  193. if (_email_verify_token_expires_at && _email_verify_token_expires_at.__type === 'Date') {
  194. _email_verify_token_expires_at = _email_verify_token_expires_at.iso;
  195. }
  196. if (this.config.emailVerifyTokenReuseIfValid && this.config.emailVerifyTokenValidityDuration && _email_verify_token && new Date() < new Date(_email_verify_token_expires_at)) {
  197. return Promise.resolve(true);
  198. }
  199. const shouldSend = await this.setEmailVerifyToken(user, {
  200. object: _node.default.User.fromJSON(Object.assign({
  201. className: '_User'
  202. }, user)),
  203. master,
  204. installationId,
  205. ip,
  206. resendRequest: true
  207. });
  208. if (!shouldSend) {
  209. return;
  210. }
  211. return this.config.database.update('_User', {
  212. username: user.username
  213. }, user);
  214. }
  215. async resendVerificationEmail(username, req) {
  216. var _req$auth2, _req$auth3;
  217. const aUser = await this.getUserIfNeeded({
  218. username: username
  219. });
  220. if (!aUser || aUser.emailVerified) {
  221. throw undefined;
  222. }
  223. const generate = await this.regenerateEmailVerifyToken(aUser, (_req$auth2 = req.auth) === null || _req$auth2 === void 0 ? void 0 : _req$auth2.isMaster, (_req$auth3 = req.auth) === null || _req$auth3 === void 0 ? void 0 : _req$auth3.installationId, req.ip);
  224. if (generate) {
  225. this.sendVerificationEmail(aUser, req);
  226. }
  227. }
  228. setPasswordResetToken(email) {
  229. const token = {
  230. _perishable_token: (0, _cryptoUtils.randomString)(25)
  231. };
  232. if (this.config.passwordPolicy && this.config.passwordPolicy.resetTokenValidityDuration) {
  233. token._perishable_token_expires_at = _node.default._encode(this.config.generatePasswordResetTokenExpiresAt());
  234. }
  235. return this.config.database.update('_User', {
  236. $or: [{
  237. email
  238. }, {
  239. username: email,
  240. email: {
  241. $exists: false
  242. }
  243. }]
  244. }, token, {}, true);
  245. }
  246. async sendPasswordResetEmail(email) {
  247. if (!this.adapter) {
  248. throw 'Trying to send a reset password but no adapter is set';
  249. // TODO: No adapter?
  250. }
  251. let user;
  252. if (this.config.passwordPolicy && this.config.passwordPolicy.resetTokenReuseIfValid && this.config.passwordPolicy.resetTokenValidityDuration) {
  253. const results = await this.config.database.find('_User', {
  254. $or: [{
  255. email,
  256. _perishable_token: {
  257. $exists: true
  258. }
  259. }, {
  260. username: email,
  261. email: {
  262. $exists: false
  263. },
  264. _perishable_token: {
  265. $exists: true
  266. }
  267. }]
  268. }, {
  269. limit: 1
  270. }, Auth.maintenance(this.config));
  271. if (results.length == 1) {
  272. let expiresDate = results[0]._perishable_token_expires_at;
  273. if (expiresDate && expiresDate.__type == 'Date') {
  274. expiresDate = new Date(expiresDate.iso);
  275. }
  276. if (expiresDate > new Date()) {
  277. user = results[0];
  278. }
  279. }
  280. }
  281. if (!user || !user._perishable_token) {
  282. user = await this.setPasswordResetToken(email);
  283. }
  284. const token = encodeURIComponent(user._perishable_token);
  285. const username = encodeURIComponent(user.username);
  286. const link = buildEmailLink(this.config.requestResetPasswordURL, username, token, this.config);
  287. const options = {
  288. appName: this.config.appName,
  289. link: link,
  290. user: (0, _triggers.inflate)('_User', user)
  291. };
  292. if (this.adapter.sendPasswordResetEmail) {
  293. this.adapter.sendPasswordResetEmail(options);
  294. } else {
  295. this.adapter.sendMail(this.defaultResetPasswordEmail(options));
  296. }
  297. return Promise.resolve(user);
  298. }
  299. updatePassword(username, token, password) {
  300. return this.checkResetTokenValidity(username, token).then(user => updateUserPassword(user, password, this.config)).then(user => {
  301. const accountLockoutPolicy = new _AccountLockout.default(user, this.config);
  302. return accountLockoutPolicy.unlockAccount();
  303. }).catch(error => {
  304. if (error && error.message) {
  305. // in case of Parse.Error, fail with the error message only
  306. return Promise.reject(error.message);
  307. } else {
  308. return Promise.reject(error);
  309. }
  310. });
  311. }
  312. defaultVerificationEmail({
  313. link,
  314. user,
  315. appName
  316. }) {
  317. const text = 'Hi,\n\n' + 'You are being asked to confirm the e-mail address ' + user.get('email') + ' with ' + appName + '\n\n' + '' + 'Click here to confirm it:\n' + link;
  318. const to = user.get('email');
  319. const subject = 'Please verify your e-mail for ' + appName;
  320. return {
  321. text,
  322. to,
  323. subject
  324. };
  325. }
  326. defaultResetPasswordEmail({
  327. link,
  328. user,
  329. appName
  330. }) {
  331. const text = 'Hi,\n\n' + 'You requested to reset your password for ' + appName + (user.get('username') ? " (your username is '" + user.get('username') + "')" : '') + '.\n\n' + '' + 'Click here to reset it:\n' + link;
  332. const to = user.get('email') || user.get('username');
  333. const subject = 'Password Reset for ' + appName;
  334. return {
  335. text,
  336. to,
  337. subject
  338. };
  339. }
  340. }
  341. // Mark this private
  342. exports.UserController = UserController;
  343. function updateUserPassword(user, password, config) {
  344. return _rest.default.update(config, Auth.master(config), '_User', {
  345. objectId: user.objectId
  346. }, {
  347. password: password
  348. }).then(() => user);
  349. }
  350. function buildEmailLink(destination, username, token, config) {
  351. const usernameAndToken = `token=${token}&username=${username}`;
  352. if (config.parseFrameURL) {
  353. const destinationWithoutHost = destination.replace(config.publicServerURL, '');
  354. return `${config.parseFrameURL}?link=${encodeURIComponent(destinationWithoutHost)}&${usernameAndToken}`;
  355. } else {
  356. return `${destination}?${usernameAndToken}`;
  357. }
  358. }
  359. var _default = exports.default = UserController;
  360. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfY3J5cHRvVXRpbHMiLCJyZXF1aXJlIiwiX3RyaWdnZXJzIiwiX0FkYXB0YWJsZUNvbnRyb2xsZXIiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwiX01haWxBZGFwdGVyIiwiX3Jlc3QiLCJfbm9kZSIsIl9BY2NvdW50TG9ja291dCIsIl9Db25maWciLCJlIiwiX19lc01vZHVsZSIsImRlZmF1bHQiLCJvd25LZXlzIiwiciIsInQiLCJPYmplY3QiLCJrZXlzIiwiZ2V0T3duUHJvcGVydHlTeW1ib2xzIiwibyIsImZpbHRlciIsImdldE93blByb3BlcnR5RGVzY3JpcHRvciIsImVudW1lcmFibGUiLCJwdXNoIiwiYXBwbHkiLCJfb2JqZWN0U3ByZWFkIiwiYXJndW1lbnRzIiwibGVuZ3RoIiwiZm9yRWFjaCIsIl9kZWZpbmVQcm9wZXJ0eSIsImdldE93blByb3BlcnR5RGVzY3JpcHRvcnMiLCJkZWZpbmVQcm9wZXJ0aWVzIiwiZGVmaW5lUHJvcGVydHkiLCJfdG9Qcm9wZXJ0eUtleSIsInZhbHVlIiwiY29uZmlndXJhYmxlIiwid3JpdGFibGUiLCJpIiwiX3Rv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