Learn how to authenticate with Infisical using JWT-based authentication.
/api/v1/auth/jwt-auth/login
endpoint. If successful, then Infisical returns a short-lived access token that can be used to make authenticated requests to the Infisical API.
To be more specific:
/api/v1/auth/jwt-auth/login
endpoint.Creating an identity
2592000
equivalent to 30 days): The lifetime for an access token in seconds. This value will be referenced at renewal time.2592000
equivalent to 30 days): The maximum lifetime for an access token in seconds. This value will be referenced at renewal time.0
): The maximum number of times that an access token can be used; a value of 0
implies infinite number of uses.0.0.0.0/0
, allowing usage from any network address.subject
, audiences
, and claims
fields support glob pattern matching; however, we highly recommend using hardcoded values whenever possible.Adding an identity to a project
Accessing the Infisical API with the identity
/api/v1/auth/jwt-auth/login
endpoint.We provide a code example below of how you might use the JWT to authenticate with Infisical to gain access to the Infisical API.Sample code for inside an application
2592000
seconds (30 days) which can be adjusted in the configuration.If an identity access token exceeds its max TTL or maximum number of uses, it can no longer authenticate with the Infisical API. In this case,
a new access token should be obtained by performing another login operation with a valid JWT.