mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-06-25 21:01:54 +08:00
🐛 Always transform undefined to null values for user name and image in OAuth profile extraction
Closes #2199
This commit is contained in:
parent
235bd9944b
commit
b8d589931d
@ -132,9 +132,9 @@ if (env.CUSTOM_OAUTH_ISSUER) {
|
||||
profile(profile) {
|
||||
const user = {
|
||||
id: getAtPath(profile, env.CUSTOM_OAUTH_USER_ID_PATH),
|
||||
name: getAtPath(profile, env.CUSTOM_OAUTH_USER_NAME_PATH),
|
||||
name: getAtPath(profile, env.CUSTOM_OAUTH_USER_NAME_PATH) ?? null,
|
||||
email: getAtPath(profile, env.CUSTOM_OAUTH_USER_EMAIL_PATH),
|
||||
image: getAtPath(profile, env.CUSTOM_OAUTH_USER_IMAGE_PATH),
|
||||
image: getAtPath(profile, env.CUSTOM_OAUTH_USER_IMAGE_PATH) ?? null,
|
||||
};
|
||||
return userSchema
|
||||
.pick({ id: true, email: true, name: true, image: true })
|
||||
|
||||
Loading…
Reference in New Issue
Block a user