Hi Meteor community,
I’m stuck trying to workaround a breaking change in Meteor 1.8 when the oauth1 atmosphere package was updated to ES2015+. It doesn’t appear that my code stored under /server (rather than /imports) can create an instance of an OAuth1Binding anymore.
Any idea why?
Is there a workaround?
The error I get is: OAuth1Binding is not a constructor.
I’ve tried adding "import {OAuth1Binding} from ‘meteor/oauth1’; to the top of the file without any success.
FWIW, when I try moving this code under /imports/startup/server it fails for other reasons.
Here’s the source code for the file with this error.
This code calls a custom OAuth1 API to login a user when they try signing in, and then creates a user in Meteor’s DB with properties returned by that web service.
Thanks for any help you can offer!
Be well,
Andrew
Call stack
I20181016-17:52:16.683(-7)? Exception while invoking method 'login' TypeError: OAuth1Binding is not a constructor
I20181016-17:52:16.684(-7)? at requestUserInfo (server/accounts-olc.js:259:24)
I20181016-17:52:16.684(-7)? at MethodInvocation.Meteor.handleLoginWithABC (server/accounts-olc.js:86:22)
I20181016-17:52:16.684(-7)? at tryLoginMethod (packages/accounts-base/accounts_server.js:460:31)
I20181016-17:52:16.684(-7)? at tryLoginMethod (packages/accounts-base/accounts_server.js:1294:14)
I20181016-17:52:16.684(-7)? at AccountsServer._runLoginHandlers (packages/accounts-base/accounts_server.js:458:22)
I20181016-17:52:16.684(-7)? at MethodInvocation.methods.login (packages/accounts-base/accounts_server.js:518:31)
I20181016-17:52:16.684(-7)? at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1767:12)
I20181016-17:52:16.684(-7)? at DDP._CurrentMethodInvocation.withValue (packages/ddp-server/livedata_server.js:719:19)
I20181016-17:52:16.684(-7)? at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
I20181016-17:52:16.684(-7)? at DDPServer._CurrentWriteFence.withValue (packages/ddp-server/livedata_server.js:717:46)
I20181016-17:52:16.685(-7)? at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1304:12)
I20181016-17:52:16.685(-7)? at Promise (packages/ddp-server/livedata_server.js:715:46)
I20181016-17:52:16.685(-7)? at new Promise (<anonymous>)
I20181016-17:52:16.685(-7)? at Session.method (packages/ddp-server/livedata_server.js:689:23)
I20181016-17:52:16.686(-7)? at packages/ddp-server/livedata_server.js:559:clock430: