Account Link Extension not working because some OpenID profiles are missing emails

I’m working on a very simple Spring Boot application, where really all I want is to get a stable identifier for the user to use as a primary key in my DB, and have it be shared across different OAuth providers. I gather that the Account Link Extension does what I want, and should automatically prompt the user to link accounts.

I’ve installed the extension per the instructions, and have created a number of users with accounts using my email, but no option to link is shown. When I look at the users in the Dashboard, I see one user per provider, and the only one that has an email is the Google account (which was the first one I created). I’m guessing this is why they didn’t link.

I do have email defined in my scope:

spring.security.oauth2.client.registration.auth0.scope[0]=openid spring.security.oauth2.client.registration.auth0.scope[1]=profile spring.security.oauth2.client.registration.auth0.scope[2]=email

Is there something I’m missing here? Why aren’t the other providers associating an email to the user? I’m new to Spring Boot and am using mostly default configurations. I’m not sure if I missed something on that side, but it does work for the Google account.

Hi @Zek ,

Welcome to the Auth0 Community!

I checked your tenant. Under the Raw JSON of Users, the user has two types of connections: Google-oauth2 and username-password. Looks like it’s working. Can you confirm? Thank you.

1 Like

Sorry, I deleted the other users, check again now. Google and username-password do link correctly. Microsoft and Facebook don’t include the emails in the Raw JSON. Apple actually failed to create with an error so I haven’t been able to test that: Imgur: The magic of the Internet