Register user under all applications of a tenant
-
When using the FusionAuth Login APIs, I noticed that I do not get back a
refresh_token
if the user is not registered with the application that I'm currently logging them into. I was able to solve this issue by running a script to update the registration of all users to include this application. However, now that I'm trying to create new applications under the same tenant to test how my application behaves when JWT tokens expire, I find myself having to run my scripts again to update registrations of all users to include this new application.This approach simply does not scale . Is there a setting that I'm missing wherein a user can be registered against all applications of a tenant---existing and future ones?
-
Nope.
However, you can write some code to do this. You could write two scripts:
- one to add a user, which should register them to all applications
- one to add an application, which should register all users
Further reading:
This post is probably worth a read, to clarify how FusionAuth handles users without an application registration: https://fusionauth.io/community/forum/topic/5/can-you-limit-a-user-s-login-authentication-access-to-applications-within-a-single-tenant/2?_=1597070984952
You also might be interested in voting up this issue: https://github.com/FusionAuth/fusionauth-issues/issues/772
You could also file a github issue explaining what you are trying to accomplish, perhaps there's a feature to be written to allow this.