Login API
-
Reading the docs regarding
/api/login
I understand that it must be possible to login a user withloginId
andpassword
and no additional fields or API key:{ "loginId": "testuser@example.com", "password": "password" }
However I get the "TenantIdRequired" error with the following message:
{ "generalErrors": [ { "code": "[TenantIdRequired]", "message": "A Tenant Id is required to complete this request. To complete this request, you may assign a Tenant to your API key, or add the X-FusionAuth-TenantId HTTP request header with the Tenant Id." } ] }
FusionAuth Version is 1.27.2.
Made a quickstart with homebrew.
Am I missing something? Thank you! -
I think you missed to put FusionAuth Tenant ID.
In my case, I create a file called
appConfig.json
:The file contains :
- FusionAuth URL (where you deploy your FusionAuth app such as https://login.mywebsite.com)
- FusionAuth Tenant ID
- FusionAuth App ID
- FusionAuth Client Key
Afterwards, I create a new instance of FusionAuth like this (in another file):
I pass FusionAuth Tenant ID here as a parameter.
Hence, I can fire a login function like below :