Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,23 @@ public Builder getBuilder(String registrationId) {

},

X {

@Override
public Builder getBuilder(String registrationId) {
ClientRegistration.Builder builder = getBuilder(registrationId,
ClientAuthenticationMethod.CLIENT_SECRET_POST, DEFAULT_REDIRECT_URL);
builder.scope("users.read", "tweet.read");
builder.authorizationUri("https://x.com/i/oauth2/authorize");
builder.tokenUri("https://api.x.com/2/oauth2/token");
builder.userInfoUri("https://api.x.com/2/users/me");
builder.userNameAttributeName("username");
builder.clientName("X");
return builder;
}

},

OKTA {

@Override
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/reactive/oauth2/login/core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ A `ClientRegistration` can be initially configured using discovery of an OpenID
[[webflux-oauth2-login-common-oauth2-provider]]
== CommonOAuth2Provider

`CommonOAuth2Provider` pre-defines a set of default client properties for a number of well known providers: Google, GitHub, Facebook, and Okta.
`CommonOAuth2Provider` pre-defines a set of default client properties for a number of well known providers: Google, GitHub, Facebook, X, and Okta.

For example, the `authorization-uri`, `token-uri`, and `user-info-uri` do not change often for a Provider.
Therefore, it makes sense to provide default values in order to reduce the required configuration.
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/servlet/oauth2/login/core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ You can initially configure a `ClientRegistration` by using discovery of an Open
[[oauth2login-common-oauth2-provider]]
== CommonOAuth2Provider

`CommonOAuth2Provider` pre-defines a set of default client properties for a number of well known providers: Google, GitHub, Facebook, and Okta.
`CommonOAuth2Provider` pre-defines a set of default client properties for a number of well known providers: Google, GitHub, Facebook, X, and Okta.

For example, the `authorization-uri`, `token-uri`, and `user-info-uri` do not change often for a provider.
Therefore, it makes sense to provide default values, to reduce the required configuration.
Expand Down