Generic oauth failing on missing email
Ouath providers that do not offer an email claim fail when using the generic oauth plugin with
Seeing how both Twitter and Tiktok allow for null emails, I would expect similar behavior in the generic oauth plugin as well. Or, alternatively, a way (a la Auth.js) to write and use custom providers.
Moreover,
Edit* the last part has been fixed in 1.2.6 so
email_is_missing.Seeing how both Twitter and Tiktok allow for null emails, I would expect similar behavior in the generic oauth plugin as well. Or, alternatively, a way (a la Auth.js) to write and use custom providers.
mapProfileToUser has no affect on the above as this method is being invoked after the email check fails. One must use a custom getUserInfo method to get around this restriction. See here: https://github.com/better-auth/better-auth/blob/6a0898fa88d1a49163b711fdbfa05489e0301a2c/packages/better-auth/src/plugins/generic-oauth/index.ts#L606Edit* the last part has been fixed in 1.2.6 so
mapProfileToUser now works as expected. Still the outstanding issue of handling missing emails