important-river-90900
06/15/2023, 9:56 AMonError
prop, doesn't get invoked when the login fails. (when is it triggered?)
3. i couldn't see other callbacks on the React SDK (https://github.com/descope/react-sdk/blob/583820e9bbc6df0442c14b3512a26b071869a123/src/components/Descope.tsx)
Am i missing something? or is it not possible to do?gifted-florist-65280
06/15/2023, 11:06 AMimportant-river-90900
06/15/2023, 1:17 PMNone of the following inputs where provided to SSO login: Email, Tenant Name or Tenant ID.
tenant name or tenant ID are irrelevant info for the end user. they only have to put in an e-mail. so this is confusing.
3. I also want to be able to log this error message to my DB to get visibility on issues around login. But the onError
callback doesn't get triggered.
It's a problemgifted-florist-65280
06/15/2023, 3:24 PMonError
callback gets triggered if the flow ended. in this case, because the flow ‘handled the error on itself’ and technically the user can continue to a ‘successful path’ in the flow - it doesn’t count as an end. but the feedback in general is good - i’ll raise this one 🙏🏼important-river-90900
06/15/2023, 7:21 PMimportant-river-90900
06/15/2023, 7:21 PMquiet-area-427
07/09/2023, 1:18 PMerrorTransformer
to our react-sdk
You are now able to pass a function that gets an error object and return a string to the end user, for example:
const errorTransformer = useCallback(
(error: { text: string; type: string }) => {
const translationMap = {
SAMLStartFailed: 'Failed to start SAML flow'
};
return translationMap[error.type] || error.text;
},
[]
);
...
<Descope
...
errorTransformer={errorTransformer}
/>
You can get it by using the next
version (0.0.0-next-8d715fcd-20230709
)
Please LMK if anything further is needed for this