Hello! Using Passwordless, what is the easiest way to add some context data on createCode() and to r...
m
Hello! Using Passwordless, what is the easiest way to add some context data on createCode() and to read them on consumeCode()? Can I override createCode/consumeCode to encode/decode my own JWT? Thanks.
r
hey @masterofpoupette you can add data against this field call preAuthSessionId, which is the result of calling the original impl of createCode, and is also the input to consumeCode. The data can be stored in your own db with the key of preAuthSessionId. You would remove this mapping after you have consumed it in consumeCode.
m
Thank you for your feedback. I wanted to avoid read/write in the database for this, but if it's the easiest, I'll go for it.
r
yeaaa.. that is the easiest