MCPcopy
hub / github.com/parse-community/parse-server / validateAuthData

Function validateAuthData

src/Adapters/Auth/meetup.js:8–22  ·  view source on GitHub ↗
(authData)

Source from the content-addressed store, hash-verified

6
7// Returns a promise that fulfills iff this user id is valid.
8async function validateAuthData(authData) {
9 const config = Config.get(Parse.applicationId);
10 const meetupConfig = config.auth.meetup;
11
12 Deprecator.logRuntimeDeprecation({ usage: 'meetup adapter' });
13
14 if (!meetupConfig?.enableInsecureAuth) {
15 throw new Parse.Error('Meetup only works with enableInsecureAuth: true');
16 }
17
18 const data = await request('member/self', authData.access_token);
19 if (data?.id !== authData.id) {
20 throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Meetup auth is invalid for this user.');
21 }
22}
23
24// Returns a promise that fulfills iff this app id is valid.
25function validateAppId() {

Callers

nothing calls this directly

Calls 3

logRuntimeDeprecationMethod · 0.80
requestFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected