(authData)
| 6 | |
| 7 | // Returns a promise that fulfills iff this user id is valid. |
| 8 | async 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. |
| 25 | function validateAppId() { |
nothing calls this directly
no test coverage detected