FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Passwordless authentication populate JWT token

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    2
    2
    977
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      devsoep
      last edited by

      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

      1 Reply Last reply Reply Quote 1
      • V
        vinicius.campitelli
        last edited by

        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 on Access 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:

        235241bf-3086-4565-a424-a14398bdcafd-image.png

        1 Reply Last reply Reply Quote 0
        • First post
          Last post