Web module returns undefined, why?

Hey, it looks like the issue is in your backend function. You aren’t returning anything to the FE.

I would try something like this:
swap this line

export function tokenSwap(authCode)

with

export async function tokenSwap(authCode)

then for the fetch put something like

let results = await fetch ....

then before your last closing }

return results;

You can also test the backend code before hooking it up to the front by providing it whatever data it needs to run so you can confirm it’s working before hooking it up to the FE