
User16421791517005709055 (Customer) asked a question.
Hello all, I've seen some suggested username transformation solutions that utilize fetch calls to other sources (haven't seen a complete working solution yet). However when attempting to use a fetch call, Okta will continue to sign the user in without waiting for fetch to finish and properly transform the username. Is there anything that I'm missing here? The data comes back properly, but it just doesn't come back in time even with await.
config.transformUsername = async function(username,operation) {
let url = 'someurl';
const res = await fetch(url);
const data = await res.json();
return data[username]
? data[username]
: username;
}

Hi, @User16421791517005709055 (Customer)
Thank you for posting on our Community page!
My advice would be to leverage the Okta Developer forums for this type of questions and take advantage of their expertise.
https://devforum.okta.com/
Thank you for reaching out to our Community and have a great day!
_____________________________________________________________________________
Community members help others by clicking Like or Select as Best on responses. Try it today.
_____________________________________________________________________________