shu-sin
BABetter Auth
•Created by shu-sin on 4/6/2025 in #bug-reports
Generic oauth failing on missing email
yeah similar. I believe they talked about this elsewhere that they planned on revamping the oauth flow for more control but no roadmap
20 replies
BABetter Auth
•Created by shu-sin on 4/6/2025 in #bug-reports
Generic oauth failing on missing email
Looks like there is no way to hook into this. An option I am exploring now is creating a temp email (similar to the anonymous plugin) and redirecting users into an onboarding flow with hooks if the user email is both unverified and contains a
temp-
string. Then I can push the user into an email and email verification flow20 replies
BABetter Auth
•Created by shu-sin on 4/6/2025 in #bug-reports
Generic oauth failing on missing email
I think this would be a more ideal solution and would prefer this. I haven't explored it much yet but this might be achievable with hooks, state and handling
email_is_missing
but I can't think of a clean way. Ideally the generic oauth plugin wouldn't fail before user creation and we could instead mark the user.email
prop as optional but unique. I need to look at hooks during the callback lifecycle and see if there's anything usable. Looking breifly at the source code makes me think it's currently not possible20 replies
BABetter Auth
•Created by shu-sin on 4/6/2025 in #bug-reports
Generic oauth failing on missing email
I do still think email should be nullable personally
20 replies
BABetter Auth
•Created by shu-sin on 4/6/2025 in #bug-reports
Generic oauth failing on missing email
I am looking now into options using the username plugin and/or remapping user.email attribute to something like a
uniqueId
that could be an email or username20 replies
BABetter Auth
•Created by shu-sin on 4/6/2025 in #bug-reports
Generic oauth failing on missing email
Yes but I have proposed this in another place and haven't yet received a response. This is our current approach too however I am not sure if this has a knock-on effect in other areas of auth where the email is expected to be resolvable (invite emails, etc)
20 replies
BABetter Auth
•Created by shu-sin on 4/6/2025 in #help
Guidance on JWT / Bearer usage for external APIs
The last point is future implementation and could potentially be solved with API keys instead however at the start we need to handle JWTs as bearer
3 replies
BABetter Auth
•Created by shu-sin on 3/30/2025 in #help
Dealing with generic OAuth provider that does not send email and account linking
After reviewing the codebase and comparing to twitter and TikTok, I can see email is engrained in the internals so this level of customization wouldn’t be possible
4 replies
BABetter Auth
•Created by shu-sin on 3/30/2025 in #help
Dealing with generic OAuth provider that does not send email and account linking
Or I should rather say is there a way to hook into the user create action to look for an existing user based on something other than email?
4 replies