MCPcopy Create free account
hub / github.com/codecombat/codecombat / signupWithGPlus

Method signupWithGPlus

app/models/User.js:1068–1082  ·  view source on GitHub ↗
(name, email, gplusID, options = {})

Source from the content-addressed store, hash-verified

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 = {} }

Callers 5

onSubmitFormMethod · 0.80
createAccountFunction · 0.80
onTrialRequestSubmitMethod · 0.80
createAccountFunction · 0.80

Calls 4

tokenMethod · 0.45
stringifyMethod · 0.45
fetchMethod · 0.45
trackEventMethod · 0.45

Tested by

no test coverage detected