Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page is not open with a domain url set in React default page #1495

Open
rcbandit111 opened this issue Feb 11, 2025 · 0 comments
Open

Page is not open with a domain url set in React default page #1495

rcbandit111 opened this issue Feb 11, 2025 · 0 comments

Comments

@rcbandit111
Copy link

I have a React FE app which I run using the default localhost:3000 url address.

When I change the default url to a custom domain and upload it on nginx I get into Spring authorization server only this: GET http://111.111.111.111:30121/.well-known/openid-configuration

Payload:

{"issuer":"http://111.111.111.111:30121","authorization_endpoint":"http://111.111.111.111:30121/oauth2/authorize","device_authorization_endpoint":"http://111.111.111.111:30121/oauth2/device_authorization","token_endpoint":"http://111.111.111.111:30121/oauth2/token","token_endpoint_auth_methods_supported":["client_secret_basic","client_secret_post","client_secret_jwt","private_key_jwt","tls_client_auth","self_signed_tls_client_auth"],"jwks_uri":"http://111.111.111.111:30121/oauth2/jwks","userinfo_endpoint":"http://111.111.111.111:30121/userinfo","end_session_endpoint":"http://111.111.111.111:30121/connect/logout","response_types_supported":["code"],"grant_types_supported":["authorization_code","client_credentials","refresh_token","urn:ietf:params:oauth:grant-type:device_code","urn:ietf:params:oauth:grant-type:token-exchange"],"revocation_endpoint":"http://111.111.111.111:30121/oauth2/revoke","revocation_endpoint_auth_methods_supported":["client_secret_basic","client_secret_post","client_secret_jwt","private_key_jwt","tls_client_auth","self_signed_tls_client_auth"],"introspection_endpoint":"http://111.111.111.111:30121/oauth2/introspect","introspection_endpoint_auth_methods_supported":["client_secret_basic","client_secret_post","client_secret_jwt","private_key_jwt","tls_client_auth","self_signed_tls_client_auth"],"code_challenge_methods_supported":["S256"],"tls_client_certificate_bound_access_tokens":true,"subject_types_supported":["public"],"id_token_signing_alg_values_supported":["RS256"],"scopes_supported":["openid"]}```

The page is blank when I open it. I added this Spring Authorization Server client configuration:
@Bean
@Primary
public InMemoryRegisteredClientRepository usersRegisteredClientRepository() {
    RegisteredClient tokenExchangeClient1 = RegisteredClient.withId(UUID.randomUUID()
                    .toString())
            .clientId(clientId)
            .clientSecret(passwordEncoder().encode(clientSecret))
            .authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE)
            .authorizationGrantType(AuthorizationGrantType.REFRESH_TOKEN)
            .clientAuthenticationMethod(ClientAuthenticationMethod.CLIENT_SECRET_BASIC)
            .scope(OPENID)
            .scope(PROFILE)
            .scope(EMAIL)
            .scope("offline_access")
            .redirectUri("http://localhost:3000/dashboard")
            .redirectUri("http://localhost:3000/sign-in")
            .redirectUri("http://mypublicdomain.com/dashboard")
            .redirectUri("http://mypublicdomain.com/sign-in")
            .clientSettings(userClientSettings())
            .tokenSettings(userTokenSettings())
            .build();

    InMemoryRegisteredClientRepository registeredClientRepository = new InMemoryRegisteredClientRepository(tokenExchangeClient1);
    return registeredClientRepository;
}

Do you know what check is not passed and what might be wrong?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant