From adb4ef1af88339e05f0c48abf857c0b92cd143b2 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Sat, 25 Apr 2026 21:11:07 +0200 Subject: [PATCH] fix: enable email sign-in method alongside username in all modes The sign-in experience must always include both email+password and username+password methods. The admin user signs in with their email (admin@company.com) which the sign-in UI detects as email type. With only username method enabled, Logto rejects it with "this sign-in method is not activated." Fixes both bootstrap Phase 8c and EmailConnectorService disable path. Co-Authored-By: Claude Opus 4.6 (1M context) --- docker/logto-bootstrap.sh | 6 ++++++ .../siegeln/cameleer/saas/vendor/EmailConnectorService.java | 1 + 2 files changed, 7 insertions(+) diff --git a/docker/logto-bootstrap.sh b/docker/logto-bootstrap.sh index aa2f588..6e3dfe3 100644 --- a/docker/logto-bootstrap.sh +++ b/docker/logto-bootstrap.sh @@ -593,6 +593,12 @@ api_patch "/api/sign-in-exp" '{ "signInMode": "SignIn", "signIn": { "methods": [ + { + "identifier": "email", + "password": true, + "verificationCode": false, + "isPasswordPrimary": true + }, { "identifier": "username", "password": true, diff --git a/src/main/java/net/siegeln/cameleer/saas/vendor/EmailConnectorService.java b/src/main/java/net/siegeln/cameleer/saas/vendor/EmailConnectorService.java index b1a81fb..90d07cb 100644 --- a/src/main/java/net/siegeln/cameleer/saas/vendor/EmailConnectorService.java +++ b/src/main/java/net/siegeln/cameleer/saas/vendor/EmailConnectorService.java @@ -138,6 +138,7 @@ public class EmailConnectorService { ), "signIn", Map.of( "methods", List.of( + Map.of("identifier", "email", "password", true, "verificationCode", false, "isPasswordPrimary", true), Map.of("identifier", "username", "password", true, "verificationCode", false, "isPasswordPrimary", true) ) )