fusionauth-issues icon indicating copy to clipboard operation
fusionauth-issues copied to clipboard

Populate Lambda does not execute without a registration when calling `api/login` to complete a login

Open jobannon opened this issue 1 year ago • 1 comments

Description

I want to log a user in via api/login and have populate lambda that is not executing upon login

Observed versions

1.53.2

Affects versions

The version, or versions where this bug exists. If you do not know, please leave blank for now.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create a populate lambda. Make this lambda add a claim to the jwt (i.e. jwt.foo = bar)
  2. Assign the populate lambda to a FusionAuth Application
  3. DO NOT register the user the application above (if the user is registered, this all works correctly)
  4. Call API login to log a user in
curl --request POST \
  --url https://local.fusionauth.io/api/login \
  --header 'Authorization: bf69486b-4733-4470-a592-f1bfce7af580' \
  --header 'Content-Type: application/json' \

  --data '{
  "loginId": "fooman2",
  "password": "password",
  "applicationId": "85a03867-dccf-4882-adde-1a79aeec50df"
}'

See that the resulting JWT does not have the claims added by the populate lambda

Expected behavior

The populate lambda should execute regardless of registration status

Platform

(Please complete the following information) Dev setup

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

Additional context

  • https://fusionauth.zendesk.com/agent/tickets/77185

jobannon avatar Oct 11 '24 16:10 jobannon

Internal:

  • https://github.com/FusionAuth/fusionauth-app/pull/565
  • https://github.com/FusionAuth/fusionauth-site/pull/3357

robotdan avatar Oct 11 '24 16:10 robotdan