mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-27 01:16:55 -05:00
fix(roblox): mapProfileToUser should run before returning user info(#1706)
This commit is contained in:
@@ -71,6 +71,9 @@ export const roblox = (options: RobloxOptions) => {
|
||||
if (error) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const userMap = await options.mapProfileToUser?.(profile);
|
||||
|
||||
return {
|
||||
user: {
|
||||
id: profile.sub,
|
||||
@@ -78,6 +81,7 @@ export const roblox = (options: RobloxOptions) => {
|
||||
image: profile.picture,
|
||||
email: profile.preferred_username || null, // Roblox does not provide email
|
||||
emailVerified: true,
|
||||
...userMap
|
||||
},
|
||||
data: {
|
||||
...profile,
|
||||
|
||||
Reference in New Issue
Block a user