Skip to content

Commit

Permalink
fix email domain
Browse files Browse the repository at this point in the history
  • Loading branch information
dsavelev committed Oct 4, 2024
1 parent ebae3dc commit 2c79b78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/vercel/VercelMPIdentityProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

public class VercelMPIdentityProvider extends OIDCIdentityProvider implements SocialIdentityProvider<OIDCIdentityProviderConfig> {
private static final String BROKER_NONCE_PARAM = "BROKER_NONCE";
private static final String EMAIL_FALLBACK_TEMPLATE = "%[email protected]";

private static final Logger logger = Logger.getLogger(VercelMPIdentityProvider.class);
//private static final String AUTH_URL = "https://api.vercel.com/oauth/authorize";
Expand Down Expand Up @@ -152,7 +153,7 @@ protected BrokeredIdentityContext extractIdentity(AccessTokenResponse tokenRespo
String userIdPerInstallation = (String) idToken.getOtherClaims().get("user_id")

if (email == null || email.isEmpty()) {
email = userIdPerInstallation + "@vercel-marketplace.com";
email = EMAIL_FALLBACK_TEMPLATE.formatted(userIdPerInstallation);
}
// Global user ID is provided by Vercel only for Neon integrations!
// For other marketplace integrations it provides only user ID per each integration installation.
Expand Down

0 comments on commit 2c79b78

Please sign in to comment.