Auth0-spa.js update process changed Auth0's server response; now missing critical response data

I had a SPA app, built using the previous JavaScript SDK. I didn’t have an Auth0 API defined, but had login working with my SPA against my Auth0 account, with validation happening in my Azure Functions service (via the standard express JWT setup).

The process of updating to the new auth-spa library has changed some things, breaking my app. As part of the update, following the tutorial, I created an explicit API, and configured both client/server with the audience. Now, when I login Auth0 is no longer sending the username, picture, and email information. No matter what scopes I send, Auth0 always responds with “openid profile email”, yet it never sends the email itself, only the sub info. This breaks my server code, which expects username, email and profile picture to be present. I have tried many different things to try to get this fixed, but no change I’ve made has had any affect on Auth0’s ability to send me the data it was previously sending before I updated to the new library.

This seems like a pretty basic scenario, so perhaps I’ve just got something configured incorrectly. Can someone assist?

1 Like