[solved] "Exception while invoking method 'login' [object Object]

I’m seeing an Exception while invoking method 'login' [object Object] error when we have a user logging in with custom oauth solution. At the time of seeing the issue, the user has only authenticated with the auth, and does not have an entry in the users collection. For a brief time, there is an entry made into the meteor_oauth_pendingCredentials collection, but it goes away after an undetermined amount of time.

Through the oAuth provider (auth0 actually) I can see in the logs that a user authenticated and logged in successfully, which makes me wonder if something somewhere with the auth changed. Reseting the database does not help. The error seems to not give the user a logged in state, and thus cannot access any of our private routes.

If anyone has seen this sort of thing before, please advise.

If anyone knows where that Exception is being logged, that would be a great help so I can get more insight into the magic of the ol’ [object Object].

How have you implemented the oauth?

We implemented oAuth using a custom provider (auth0)

I found the error using the chrome node debugger. it’s Exception while invoking method 'login' TypeError: Accounts.oauth.serviceNames is not a function which is strange.

digging deaper, Accounts.oauth should have been attached which is strange.

Eventually found the error in an AutoVaue that was added to the users schema.

I asked because there wasn’t enough detail in the question. Repeating the same tiny snippet of information does not help me or anyone else help you.

In future, please help us help you by giving detail when asked

1 Like