Hi, I'm willing to customise my magic link callbac...
# support-questions-legacy
b
Hi, I'm willing to customise my magic link callback and call myself the consume code react SDK function but I cant find a way to send the preAuthSessionId along the userInputCode with the SDK. Am I missing something ?
r
Hey! The consumeCode function will pick the magic link's code and preAuthSessionId automatically.
The consumeCode function should find the preAuthSessionId and link code automatically. Is that not working for you?
b
I mean ThirdPartyPasswordless.consumePasswordlessCode() needs 1 argument which is the userInputCode
r
thats optional
you don't need to give it
if using magic links, it's not needed
if using OTP based, the value of it should be the OTP entered by the user.
b
I can't call
ThirdPartyPasswordless.consumePasswordlessCode()
r
@nkshah2 can help here
n
Hi, Do you get any errors when trying to call it?
b
TS2554: Expected 1 arguments, but got 0.  index.d.ts(109, 9): An argument for 'input' was not provided.
n
What version of the SDK are you using?
b
0.24.6
n
Can I see the code? Including the import and how you are calling the function
b
May it be my IDE not getting the {} | {} typing ?
n
Which IDE are you using?
b
Webstorm
n
Copy code
ThirdPartyPasswordless.consumePasswordlessCode({})
^ This should work In the meantime we will release a fix to make this better
b
Ohokay
Didn’t even tried that ˆˆ
Thank a lot
n
Happy to help