Hello people! How can we tell for a custom provide...
# support-questions-legacy
j
Hello people! How can we tell for a custom provider that its email should be marked as verified? UserInfoMap is just string-mapping so we can't put a true in the emailVerified, so to speak.
r
hey @jam_nside - @sattvikc can help with he is available.
s
@jam_nside sorry, I missed responding to this. just to understand, you would like to mark the email as verified always as opposed to fetching it from the third party provider ? Let me know which SDK (node, golang or python) you are using, I can help with the code snippet.
r
it's node
s
this can be achieved by using the getUserInfo override in the custom provider like this:
Copy code
ts
{
    config: {
        thirdPartyId: "custom",
        clients: [
            {
                clientId: "...",
                clientSecret: "..."
            }
        ]
    },
    override: (oI) => {
        return {
            ...oI,
            getUserInfo: async (input) => {
                let result = await oI.getUserInfo(input);
                if (result.email !== undefined) {
                    result.email.isVerified = true
                }
                return result
            }
        }
    }
}
j
That's awesome, thank you!