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

In the User Regsitrations add a field telling if an application is active or not

Open z4m0 opened this issue 1 year ago • 1 comments

In the User Regsitrations add a field telling if an application is active or not

Problem

We are using the User registrations in a lambda JWT populate. In it there is an element for each registration including inactive applications #1163 . We need transform the token depending on the active applications the user has registered. However we don't have a way of knowing if a registration belongs to an active application or not.

Solution

It would be sufficient to add a field indicating whether the application is active or not.

"registrations": [
  {
    "applicationId": "...",
    "data": {},
    "id": "...",
    "insertInstant": 123456,
    "lastLoginInstant": 123456,
    "lastUpdateInstant": 123456,
    "preferredLanguages": [],
    "roles": [],
    "tokens": {},
    "username": "...",
    "usernameStatus": "ACTIVE",
    "verified": true,
    "applicationActive": true
  },
...
]

z4m0 avatar Mar 15 '24 09:03 z4m0

One workaround if you have access to the Lambda HTTP Connect functionality is to retrieve the application using it.

This feature is only available on Essentials plans (and I don't know which plan you are using, @z4m0 ), but I wanted to leave it here for anyone else who might have the same issue.

mooreds avatar Mar 15 '24 13:03 mooreds