Skip to content

Can't register multiple public clients (clientAuthenticationMethod=none) #1641

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

Closed
igorsimjanoski opened this issue Jun 13, 2024 · 1 comment
Assignees
Labels
type: bug A general bug
Milestone

Comments

@igorsimjanoski
Copy link

Describe the bug
I'm trying to register two different(different client_id, redirect_uri etc) public clients (clientAuthenticationMethod=NONE) but authorization server is complaining with this error:

Registered client must be unique. Found duplicate client secret for identifier: d2e77536-6f0f-444f-9584-0c12da636a23

As far i understand, i should be able to register multiple clients as long as client_id is unique.
I'm not aware that such constraint is defined in OAuth2.0 spec.

Sample
I believe the error is coming from this method in the code:

JdbcRegisteredClientRepository.assertUniqueIdentifiers()


		count = this.jdbcOperations.queryForObject(
				COUNT_REGISTERED_CLIENT_SQL + "client_secret = ?",
				Integer.class,
				registeredClient.getClientSecret());
		if (count != null && count > 0) {
			throw new IllegalArgumentException("Registered client must be unique. " +
					"Found duplicate client secret for identifier: " + registeredClient.getId());
		}

@igorsimjanoski igorsimjanoski added the type: bug A general bug label Jun 13, 2024
@jgrandja
Copy link
Collaborator

@igorsimjanoski I'm confirming this is a bug. I will have a fix shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants