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

Method loadPerson

app/core/social-handlers/GPlusHandler.js:156–168  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

154 }
155
156 loadPerson (options) {
157 if (options == null) { options = {} }
158 if (options.success == null) { options.success = _.noop }
159 if (options.context == null) { options.context = options }
160 if (options.resp == null) { options.resp = null }
161 if (options.resp) {
162 const attrs = authUtils.parseGoogleJwtResponse(options.resp.credential)
163 this.trigger('load-person', attrs)
164 return options.success.bind(options.context)(attrs)
165 } else {
166 return console.error('gplus login failed', options)
167 }
168 }
169
170 renderButtons () {
171 if ((typeof gapi !== 'undefined' && gapi !== null ? gapi.plusone : undefined) == null) { return false }

Callers 5

successMethod · 0.45
successMethod · 0.45
successMethod · 0.45

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected