fix(roblox): mapProfileToUser should run before returning user info(#1706)

This commit is contained in:
Maxwell
2025-03-06 16:33:38 +10:00
committed by GitHub
parent 0ffbb6233a
commit 5c94ceee9f

View File

@@ -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,