However, as per https://discord.com/channels/1070212618549219328/1161828367511859291/threads/1174693165748461628 I'm currently redirecting the user to a special page which handles making an API call to map them into an organisation based on some business logic. This means I want to wait until that API call completes before I redirect back to the original URL. To enable this I'm currently using a big hack:
onRedirectCallback={(_user, appState) => { if (appState?.redirectTo) { // TODO: This is a hack to get around the fact that we don't have access to the // kinde_redirect_to in a persistant way. We need to set this in index.jsx and // read it in AssignOrg.tsx. window["kinde_redirect_to"] = appState?.redirectTo; } }}
onRedirectCallback={(_user, appState) => { if (appState?.redirectTo) { // TODO: This is a hack to get around the fact that we don't have access to the // kinde_redirect_to in a persistant way. We need to set this in index.jsx and // read it in AssignOrg.tsx. window["kinde_redirect_to"] = appState?.redirectTo; } }}
Is there a better way of doing this? I couldn't see anything returned from