Passwordless authentication populate JWT token
-
Hi,
We are currently testing passwordless authentication. The flow works fine, however it seems the lambda we are using to enrich the access token is not called.
We have enabled debugging to ensure the lamda is called when using password authentication. This works fine.
Are we missing a toggle somewhere?
Cheers,
Peter
-
Hi there!
Please make sure that you have selected that Lambda in your Application by navigating to its edit page, going to the
JWT
tab and choosing it onAccess Token populate lambda
.For instance, my (extremely simple) function looks like:
function populate(jwt, user, registration) { jwt.customClaim = 'gotcha'; console.debug(JSON.stringify(user)); }
And I received the following access token with that
customClaim
at the end: