Skip to content

Commit 74cab45

Browse files
committed
add validateOptions
1 parent ad81690 commit 74cab45

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

spec/AuthenticationAdaptersV2.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,12 @@ describe('Auth Adapter features', () => {
348348
it('should strip out authData if required', async () => {
349349
const spy = spyOn(modernAdapter3, 'validateOptions').and.callThrough();
350350
await reconfigureServer({ auth: { modernAdapter3 }, silent: false });
351-
expect(spy).toHaveBeenCalled();
352351
const user = new Parse.User();
353352
await user.save({ authData: { modernAdapter3: { id: 'modernAdapter3Data' } } });
354353
await user.fetch({ sessionToken: user.getSessionToken() });
355354
const authData = user.get('authData').modernAdapter3;
356355
expect(authData).toEqual({ foo: 'bar' });
356+
expect(spy).toHaveBeenCalled();
357357
});
358358

359359
it('should throw if no triggers found', async () => {

src/Adapters/Auth/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,8 @@ function loadAuthAdapter(provider, authOptions) {
191191
});
192192
}
193193
}
194-
195194
if (adapter.validateOptions) {
196-
adapter.validateOptions();
195+
adapter.validateOptions(providerOptions);
197196
}
198197

199198
return { adapter, appIds, providerOptions };

0 commit comments

Comments
 (0)