WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 7481e44

Browse files
Reset flow if action is still CHALLENGE_REQUIRED upon validation (#23)
* Reset flow if action is still CHALLENGE_REQUIRED upon validation * Bump version
1 parent a729783 commit 7481e44

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ plugins {
1010
}
1111

1212
group 'com.authsignal'
13-
version '2.2.0'
13+
version '2.2.1'
1414

1515
repositories {
1616
mavenCentral()

app/src/main/java/com/authsignal/keycloak/AuthsignalAuthenticator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ private void handleTokenValidation(AuthenticationFlowContext context, Authsignal
149149
}
150150
context.setUser(user);
151151
context.success();
152+
} else if (response.state == UserActionState.CHALLENGE_REQUIRED) {
153+
// User quit the MFA flow without completing the challenge
154+
// This means they clicked "Quit" on the AuthSignal page
155+
context.resetFlow();
152156
} else {
153157
context.failure(AuthenticationFlowError.ACCESS_DENIED);
154158
}

0 commit comments

Comments
 (0)