QQ OAuth2 Identity Provider for Keycloak 26.x.
This project provides a custom Identity Provider (IdP) implementation that enables QQ login support for Keycloak using OAuth2.
Built as a Keycloak SPI extension — no modification to Keycloak source code required.
- ✅ QQ OAuth2 login support
- ✅ Works with Keycloak 26.x
- ✅ SPI-based extension
- ✅ Production-ready Maven build
- ✅ Apache License 2.0
| Component | Version |
|---|---|
| Keycloak | 26.x |
| Java | 21 |
| Maven | 3.8+ |
This project implements a custom Identity Provider using the Keycloak SPI:
QQIdentityProviderQQIdentityProviderFactoryQQIdentityProviderConfig
It extends:
org.keycloak.broker.oidc.AbstractOAuth2IdentityProvider
Download the latest .jar file from GitHub Releases.
Place the jar file into:
/opt/keycloak/providers/
(Or your custom Keycloak installation providers directory)
Run:
bin/kc.sh buildbin/kc.sh startAfter restarting Keycloak:
- Open Admin Console
- Go to Identity Providers
- Click Add provider
- Select QQ
- Configure:
| Field | Value |
|---|---|
| Client ID | QQ App ID |
| Client Secret | QQ App Secret |
Save configuration.
-
Register application at QQ Open Platform
-
Obtain:
- App ID
- App Key
-
Configure callback URL:
https://your-domain/realms/{realm}/broker/qq/endpoint
Clone repository:
git clone https://github.com/Trashblazer/keycloak-social-provider-china.git
cd keycloak-social-provider-chinaBuild:
mvn clean verifyPackage:
mvn clean packageThe jar file will be located in:
target/
Licensed under the Apache License, Version 2.0.
See the LICENSE file for details.
Contributions are welcome.
Before submitting a PR:
- Ensure Java 21 compatibility
- Ensure
mvn verifypasses - Ensure license headers are present
- Follow standard Keycloak SPI patterns
This project is not affiliated with or endorsed by Keycloak.
Keycloak is a registered trademark of Red Hat.