Extending Meteor Accounts - Not Logging In

I’m creating Accounts packages for Edmodo and I’ve gotten the packages such that it successfully retrieves the access_token and the user’s info to create the identity.

After retrieving this info and seeing it in the server logs, my test app does not successfully log in. Instead, I get these errors:

W20150630-15:03:00.039(-4) (oauth_server.js:71) Unable to base64 decode state from OAuth query: undefined
W20150630-15:03:00.049(-4) (oauth_server.js:71) Unable to base64 decode state from OAuth query: undefined
W20150630-15:03:00.053(-4) (oauth_server.js:71) Unable to base64 decode state from OAuth query: undefined
W20150630-15:03:00.058(-4) (oauth_server.js:398) Error in OAuth Server: Match error: Expected string, got undefined

My packages can be found at accounts-edmodo and edmodo or installed with meteor add merlin:accounts-edmodo

Any suggestions on why state is undefined and how I might fix it?

1 Like

I know this is an old post, but I’m having the same issue with a custom OAuth package I’m writing, based off the default one. Did you ever fix that issue?

The errors I get are:

W20170205-00:31:27.827(-2) (oauth.js:101) Unable to base64 decode state from OAuth query: undefined
W20170205-00:31:27.831(-2) (oauth.js:101) Unable to base64 decode state from OAuth query: undefined
W20170205-00:31:27.832(-2) (oauth.js:428) Error in OAuth Server: Cannot read property 'graph' of undefined

I believe I fixed it with this commit where I added the lines regarding state

on the client
+ '&state=' + OAuth._stateParam(loginStyle, credentialToken);

on the server
state: query.state,

Unfortunately that did not work for me. Thanks for your reply!