mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-23 07:18:56 -05:00
fix(generic-oauth): async mapProfileToUser breaks
After debugging for an unacceptable amount of time, I found out that our generic oauth plugin with `mapProfileToUser` breaks when users apply `async` to their function despite our function signature supporting this. It breaks because we didn't use `await`...
This commit is contained in:
@@ -329,7 +329,7 @@ export const genericOAuth = (options: GenericOAuthOptions) => {
|
||||
emailVerified: userInfo?.emailVerified,
|
||||
image: userInfo?.image,
|
||||
name: userInfo?.name,
|
||||
...c.mapProfileToUser?.(userInfo),
|
||||
...(await c.mapProfileToUser?.(userInfo)),
|
||||
},
|
||||
data: userInfo,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user