mongodb / stitch-js-sdk

MongoDB Stitch JavaScript SDK
Apache License 2.0
113 stars 67 forks source link

Azure AD token validation with existing user returns 500 / unknown #347

Closed jvpelt closed 4 years ago

jvpelt commented 4 years ago

Maybe I'm missing something but I have been reading the docs for the past 2 days and can't seem to find anything related to what's happening.

My scenario: I connected my stitch app to an AAD and enabled the "Custom JWT Authentication". This seems to be working fine when a new user connects. As you can see in the below screenprint at 13:02:45 a new user is created and my app is connected to stitch.

Now I open a new browser window and try to connect with the same user the "/auth/providers/custom-token/login" endpoint returns a 500 with: message: "" name: "StitchServiceError" errorCode: 46 errorCodeName: "Unknown"

When I look at the log entry of this call at 13:02:52 the authentication seems to be successful but the user column remains blank.

image

jsflax commented 4 years ago

What is the actual issue?

Is it the empty logs?

It would help to know which call is associated with which log. Also, you cannot call login from the browser– it is a POST call.

jvpelt commented 4 years ago

not really sure what the issue was, I opened a support ticket and after a few weeks the error was gone without changing anything on my side..