Closed theogravity closed 1 year ago
You should be able to add the tenantId via the setTenantId
method:
https://github.com/FusionAuth/fusionauth-typescript-client/blob/master/src/FusionAuthClient.ts#L40
Have you tried that and found it didn't work?
You should be able to add the tenantId via the
setTenantId
method: https://github.com/FusionAuth/fusionauth-typescript-client/blob/master/src/FusionAuthClient.ts#L40Have you tried that and found it didn't work?
I was not aware of this method, thanks.
I only run a single instance of the client, I'm guessing setTenantId
would affect all calls once set? If I had separate tenant ids during individual requests, would I then have to create a context/request-specific client then?
I'm guessing setTenantId would affect all calls once set? If I had separate tenant ids during individual requests, would I then have to create a context/request-specific client then?
You are correct. If you have multiple tenants, you'll want to create multiple clients and call setTenantId
on each of them appropriately.
Please close this issue if the workaround is acceptable.
Thanks!
The following methods do not allow the specification of a tenant id, which is problematic when you have multiple tenants:
retrieveUserByUsername
retrieveUserByEmail