Hi, we have implemented thirdpartyemailpassword re...
# support-questions-legacy
p
Hi, we have implemented thirdpartyemailpassword recipe along with emailverification recipe. But for some users, they didnt verified their emails with the login provider. So their emails not marked as verified. For those users, when we try to call an api, we are getting claims not verified error. How to get access the api without needing to verify their emails?
r
hey @phoenix1413. are you using our pre built UI on the frontend?
p
No, custom ui
r
right. So you need to check for the email verification claim on the frontend (like our docs says), and redirect the user to your email verification screen
p
Yeah, but we don't want to redirect sso users to email verification screen. The api which is failing also for determining whether the logged in user used sso or email password.
r
Hm. In that case, you need to modify the SSO provider config on the backend to auto mark the email as verified
you can do that by overriding the getUserInfo function in the provider and setting email verification to true, regardless of what the provider says
p
Thank you @rp_st , we're gonna follow that. 😊
n
Hi @rp_st , in getUserInfo function's UserInfo object, I was't able to find the email verification parameter.. Can you tell me how to immplement that?
Also, we have to implement this in the multitenant environment and the functionality needs to be common for all tenants and for all providers
r
what is the UserInfo class?
it's part of the provider override?
you need to override the provider's function
n
This is the get_user_info function of the Provider class
r
right. So you can call the original implementation to get the info for this user first
and the just modify the email verified boolean to be true
it's in the email object
n
Doesn't have any email verified boolean!
r
UserInfoEmail object
n
oh okay
and where can I set this function to be overridden?
As it is a multitenant env, the provider config doesn;t exist in the recipe list of the config
but exists, in the tenant's provider's config
r
See this: https://supertokens.com/docs/thirdparty/common-customizations/sign-in-and-up/custom-providers#handling-non-standard-providers You can add the provider's config in the provider's array on the backend with the same thirdpartyid as the what's in the tenant config. Once the tenant is loaded, it will essentially pick up the custom impl instead of the standard one.
so you give it the
third_party_id
, and an empty
clients
array, and the override object
n
Oh okay! That's some new info!! Thanks a lot @rp_st
r
lmk if this works!
9 Views