Skip to content
Open
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 @@ -364,6 +364,10 @@ private void unknownUserChallenge(AuthenticationFlowContext context, Organizatio
form.addError(new FormMessage("Your email domain matches the " + organization.getName() + " organization but you don't have an account yet."));
}

// user is null, setup webauthn data if enabled
if (webauthnAuth.isPasskeysEnabled()) {
webauthnAuth.fillContextForm(context);
}
context.challenge(form.createLoginUsername());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,23 @@ public void webauthnLoginWithDiscoverableKey() throws IOException {

appPage.assertCurrent();

events.expectLogin()
.user(user.getId())
.detail(Details.USERNAME, user.getUsername())
.detail(Details.CREDENTIAL_TYPE, WebAuthnCredentialModel.TYPE_PASSWORDLESS)
.detail(WebAuthnConstants.USER_VERIFICATION_CHECKED, "true")
.assertEvent();

logout();
events.clear();

// login forcing the organization
oauth.scope("organization:email");
oauth.openLoginForm();
WaitUtils.waitForPageToLoad();

appPage.assertCurrent();

events.expectLogin()
.user(user.getId())
.detail(Details.USERNAME, user.getUsername())
Expand Down
Loading