MCPcopy Index your code
hub / github.com/parse-community/parse-server / mockFacebookAuthenticator

Function mockFacebookAuthenticator

spec/helper.js:383–400  ·  view source on GitHub ↗
(id, token)

Source from the content-addressed store, hash-verified

381}
382
383function mockFacebookAuthenticator(id, token) {
384 const facebook = {};
385 facebook.validateAuthData = function (authData) {
386 if (authData.id === id && authData.access_token.startsWith(token)) {
387 return Promise.resolve();
388 } else {
389 throw undefined;
390 }
391 };
392 facebook.validateAppId = function (appId, authData) {
393 if (authData.access_token.startsWith(token)) {
394 return Promise.resolve();
395 } else {
396 throw undefined;
397 }
398 };
399 return facebook;
400}
401
402function mockFacebook() {
403 return mockFacebookAuthenticator('8675309', 'jenny');

Callers 1

mockFacebookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected