Closed kfarr closed 2 weeks ago
microsoft option works, but now need to handle error auth/account-exists-with-different-credential
which is raised on line 33 of /editor/api/auth.js in the proposed PR when a user has an existing account with that email address from a different provider. For example, if a users auth's via google on user@email.com, then auth's via msft on user@email.com, they will need to "link" them together. Docs:
https://firebase.google.com/docs/auth/web/microsoft-oauth#expandable-1
suggestion from Rahul:
Do they need to link things together? Can we just throw a ui error that’s like you already have an account with us from a different provider
Adding publisher verification may be required for some enterprise environments, need to register in Partner Center and get MPN ID
applied for mpn id, legal verification is in progress eta 2-3 days
after some more research, it appears that the recommended settings for microsoft "entra" enterprise apps only accept "verified" apps https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/configure-user-consent?pivots=portal
tried getting profile image to work using this example: https://stackoverflow.com/questions/66192652/firebase-microsoft-social-auth-not-providing-photourl
it returns a 401. after some googling a 401 is expected when a user has not set a profile image. some users suggested that a 401 response may also happen if our app is not verified (partner verified) and therefore msft doesn't give the app access to the profile image. here is the branch: https://github.com/3DStreet/3dstreet/tree/microsoft-auth-profile-image
i'll pause that effort, instead we should simply use the default profile when using microsoft for now, or even a "microsoft" logo profile to indicate the user has logged in w/microsoft.
Then we can release this even ahead of being verified since it does work for microsoft personal users.
tasks: