Comments (4)
cc @FeiChen-okta do you have a MFA example handy?
from okta-auth-java.
Hey @alexzaitsev!
Usually, this means your base URL is incorrect (but was a valid URL), maybe the path in the URL is wrong? If you cannot figure it out, you can share it here (or if you want to keep it private) email Developer support: developers at okta.com
, and include a link to this thread.
from okta-auth-java.
@bdemers thanks, seems that I managed to fix it using your answer. Now I get "MFA_REQUIRED"....
If you have any idea where to dig further - please give me a link / whatever.
I'm closing this issue, thanks a lot!
from okta-auth-java.
@alexzaitsev Yes you can handle the MFA by using the state handler or simply checking the status. A simple example that only handles push/question/totp factors:
public AuthenticationResponse verifyFactor(final AuthenticationResponse response,
final FactorType type,
final String totpOrAnswer)
throws AuthenticationException {
String stateToken = response.getStateToken();
Factor factor = getFactorByType(response.getFactors(), type);
VerifyFactorRequest request;
if (type == PUSH) {
request = authenticationClient.instantiate(VerifyPushFactorRequest.class);
} else {
// For TOTP or QUESTION.
request = authenticationClient.instantiate(VerifyFactorRequest.class);
request.put(type == TOKEN_SOFTWARE_TOTP ? "passCode" : "answer", totpOrAnswer);
}
request.setStateToken(stateToken);
return authenticationClient.verifyFactor(factor.getId(), request, null);
}
The method returns a AuthenticatorResponse that should have a SUCCESS status.
If the factor is push then get the factor status and it should be WAITING. which means it is waiting for the user to accept the push notification.
from okta-auth-java.
Related Issues (20)
- Unable to use "correctAnswer" from AuthenticationResponse. HOT 17
- unable to find API to send MFA Enroll activation link via email/sms HOT 3
- Error while updating Plaid SDK 3.5.0 (Duplicate class org.bouncycastle.LICENSE) HOT 3
- Missing nullability annotations in AuthenticationStateHandler HOT 3
- is:issue is:open Okta authentication crashes, maybe okhttp library compatibility. HOT 4
- HttpClientConfiguration.getRequestExecutorParams() deprecated
- AuthenticationException localizedMessages do not adhere to Android device locale settings HOT 1
- authenticationClient.authenticate() does not return locked_out status HOT 1
- 2.0.5 dependencies result in build error HOT 2
- Resend OTP after 5 minutes - MFA. HOT 4
- enrollFactor method HOT 12
- DefaultAuthenticationClient.translateException() should be able to handle null errorCode HOT 2
- Failed resolution of: Ljava/time/format/DateTimeFormatter on Android 7 devices HOT 6
- Getting NoClassDefFound for BaseClient.java while using okta-authn-sdk-api:2.0.9 with okta-sdk-api:10.0.0 HOT 4
- Upgrade dependency okta-sdk-java version HOT 7
- Security vulnerability via transitive `dependencybcprov-jdk18on:1.75` HOT 3
- forgot password with trusted application HOT 9
- Primary authentication with trusted application not supported by SDK HOT 4
- Authentication Client Verify Factor throws Resource Exception instead of AuthenticationException HOT 4
- Incorrect key while retrieving correct answer from EmbeddedResponse HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from okta-auth-java.