iss is https://localhost:9011 and not http://localhost:9011
-
Hey guys,
Explaining what I am doing
I am validating my
access_token
andid_token
with FusionAuth by calling thisvalidateJWT
(I think internally it calls this endpoint) from Typescript client. It returnshttps://localhost:9011
as the jwt's issuer while I think it should behttp://localhost:9011
.what is the source of confusion for me?
Now I am not sure what is happening here and why
iss
's protocol isHTTPS
and not your normalHTTP
. Do I have to explicitly tell FusionAuth to use which protocol somewhere when I am configuring it withTerraform/OpenTofu
orkickstart.json
?Any idea?
Need to see my
terraform/opentofu
's conf? here it is: https://github.com/kasir-barati/you-say -
My bad, I was misconfiguring my FusionAuth instance and at the same time banging my head against a brick wall.
So who answered my question? FusionAuth Docs AI.
The
iss
orissuer
claim in FusionAuth is a URL that identifies the principal that issued the JWT. Theissuer
claim is a case-sensitive string containing a string or URI value. The processing of this claim is generally application-specific.
In FusionAuth, the issuer claim can be set in two ways:- You can set it in the tenant configuration, where it will apply for all JWTs issued for that tenant. You can modify this by navigating to "Tenants", then your tenant, then "General". Here, you can modify the "Issuer" field value.
- You can set it at the individual JWT level by modifying the JWT populate lambda. You would do this if you wanted to have a different issuer based on some information from the user or registration data.
The issuer claim is typically set to the URL of your FusionAuth instance. For example,
https://local.fusionauth.io
orhttp://localhost:9011
. The choice betweenhttp
andhttps
depends on whether your FusionAuth instance is set up to use SSL or not. If it is, thenhttps
should be used. If not, http can be used.
In the case ofhttps://localhost:9011
, this means that the FusionAuth instance is set up to use SSL and is running on the local machine on port9011
.Although it was not completely correct but its first suggestion was right on the money. I am configuring FusionAuth using
Terraform/OpenTofu
. And there I was passing the wrong value to issuer. Learn more here: https://registry.terraform.io/providers/fusionauth/fusionauth/latest/docs/resources/tenantSo I was passing
https://localhost:9011
. -