(name, email, gplusID, options = {})
| 1066 | } |
| 1067 | |
| 1068 | signupWithGPlus (name, email, gplusID, options = {}) { |
| 1069 | options.url = _.result(this, 'url') + '/signup-with-gplus' |
| 1070 | options.type = 'POST' |
| 1071 | if (options.data == null) { options.data = {} } |
| 1072 | _.extend(options.data, { name, email, gplusID, gplusAccessToken: application.gplusHandler.token() }) |
| 1073 | options.contentType = 'application/json' |
| 1074 | options.xhrFields = { withCredentials: true } |
| 1075 | options.data = JSON.stringify(options.data) |
| 1076 | const jqxhr = this.fetch(options) |
| 1077 | jqxhr.then(function () { |
| 1078 | window.tracker?.trackEvent('Google Login', { category: 'Signup', label: 'GPlus' }) |
| 1079 | return window.tracker?.trackEvent('Finished Signup', { category: 'Signup', label: 'GPlus' }) |
| 1080 | }) |
| 1081 | return jqxhr |
| 1082 | } |
| 1083 | |
| 1084 | fetchGPlusUser (gplusID, email, options = {}) { |
| 1085 | if (options.data == null) { options.data = {} } |
no test coverage detected