Hi there,
I am currently creating a React SPA that will authenticate users and create access tokens to make requests to an API.
In order to create the SPA, I am using the following Terraform code. When I create this application I tried it and when I call loginWithRedirect
and it takes me to a page returning true
instead of the Universal Login page.
I created another SPA traditionally in the Application page and it worked as it should.
I did notice that the url that I was taken was <tenant_domain>/u/login
and with the TF-created app, it was <tenant_domain>/login
resource "auth0_client" "default" {
name = "MyWebApp"
allowed_clients = []
allowed_logout_urls = ["http://localhost:4040"]
allowed_origins = []
app_type = "spa"
callbacks = ["http://localhost:4040/callback"]
client_aliases = []
cross_origin_auth = false
custom_login_page = true
is_first_party = true
is_token_endpoint_ip_header_trusted = false
oidc_conformant = true
sso_disabled = false
web_origins = ["http://localhost:4040"]
grant_types = [
"authorization_code",
"implicit",
"refresh_token",
"password",
"http://auth0.com/oauth/grant-type/password-realm",
]
jwt_configuration {
alg = "RS256"
lifetime_in_seconds = 3600
secret_encoded = false
}
native_social_login {
apple {
enabled = false
}
facebook {
enabled = false
}
}
refresh_token {
expiration_type = "expiring"
leeway = 0
token_lifetime = 2592000
idle_token_lifetime = 1296000
infinite_token_lifetime = false
infinite_idle_token_lifetime = false
rotation_type = "rotating"
}
}
resource "auth0_client_credentials" "default" {
client_id = auth0_client.default.id
authentication_method = "none"
}