quavedev / accounts-apple

Sign in with Apple OAuth2 handler for Meteor.
MIT License
2 stars 4 forks source link

Unable to parse state from OAuth query #4

Open dodocodes opened 3 years ago

dodocodes commented 3 years ago

Hello! For some reason every once and awhile sign in with Apple is failing for my users. I haven't been able to track down exactly what is causing this? This shows up as an "Internal Server Error [500]" when they attempt to login with apple id. This only happens for a select few users....

{"line":"76","file":"oauth_server.js","message":"Unable to parse state from OAuth query: ","time":{"$date":1630217743360},"level":"warn"}
Exception while invoking method 'login' SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Object.OAuth._stateFromQuery (packages/oauth/oauth_server.js:74:17)
    at getTokens (packages/quave:apple-oauth/apple_server.js:183:23)
    at MethodInvocation.<anonymous> (packages/quave:apple-oauth/apple_server.js:257:42)
    at packages/accounts-base/accounts_server.js:499:31
    at tryLoginMethod (packages/accounts-base/accounts_server.js:1341:14)
    at AccountsServer._runLoginHandlers (packages/accounts-base/accounts_server.js:497:22)
    at MethodInvocation.methods.login (packages/accounts-base/accounts_server.js:557:31)
    at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12)
    at packages/ddp-server/livedata_server.js:719:19
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
    at packages/ddp-server/livedata_server.js:717:46
    at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
    at packages/ddp-server/livedata_server.js:715:46
    at new Promise (<anonymous>)
    at Session.method (packages/ddp-server/livedata_server.js:689:23)
    at packages/ddp-server/livedata_server.js:559:43