purple-farmer-3237
01/23/2025, 8:54 AMbrief-egg-61061
01/23/2025, 8:54 AMbrief-egg-61061
01/23/2025, 8:54 AMpurple-farmer-3237
01/23/2025, 8:56 AMpurple-farmer-3237
01/23/2025, 8:56 AMbrief-egg-61061
01/23/2025, 8:56 AMbrief-egg-61061
01/23/2025, 8:57 AMyaml selfservice: flows: settings: required_aal: highest_available session: whoami: required_aal: highest_available
This configuration ensures that users are required to provide the highest level of authentication they have available, which would include TOTP if they've set it up. If you're not seeing this behavior, you may need to review your configuration or consult with Ory support to ensure it's set up correctly for your specific use case.purple-farmer-3237
01/23/2025, 8:59 AMhighest_available
for whoami and settings. Still its not asking me for TOTP. What might be the reasons ?purple-farmer-3237
01/23/2025, 8:59 AMhighest_available
for whoami and settings. Still its not asking me for TOTP. What might be the reasons ?brief-egg-61061
01/23/2025, 8:59 AMbrief-egg-61061
01/23/2025, 8:59 AMhighest_available
for whoami
and settings
. Let's explore some potential causes: 1. TOTP Configuration: Make sure that TOTP is properly configured in your Ory Kratos instance. According to the [TOTP documentation](https://www.ory.sh/docs/kratos/mfa/totp), you need to enable TOTP in your configuration file: yaml selfservice: methods: totp: config: issuer: <http://ExampleIssuerForSelfHosted.com|ExampleIssuerForSelfHosted.com> enabled: true
2. Identity Schema: Ensure that your identity schema is correctly set up to work with TOTP. As mentioned in the [Custom identity schema documentation](https://www.ory.sh/docs/kratos/mfa/totp#custom-identity-schema), you need to add a totp
section to the identity schema: json { "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "totp": { "account_name": true } } } }
3. MFA Configuration: Double-check that MFA is properly enabled for the code
method. As per the [SMS and Email 2FA documentation](https://www.ory.sh/docs/kratos/mfa/mfa-via-sms), ensure that mfa_enabled
is set to true
for the code
method: yaml code: mfa_enabled: true
4. Session Configuration: Make sure that your session configuration is correct. The [Step-up authentication documentation](https://www.ory.sh/docs/kratos/mfa/step-up-authentication) suggests checking these settings: yaml selfservice: flows: settings: required_aal: highest_available session: whoami: required_aal: highest_available
5. User Setup: Confirm that the user has actually set up TOTP for their account. If TOTP hasn't been configured for the user, they won't be prompted for it even if it's enabled system-wide. 6. Potential Bug: There's a possibility that you're encountering a bug. There have been issues reported related to MFA and passwordless authentication, such as the one described in this [GitHub issue](https://github.com/ory/network/issues/399). While this specific issue was about OIDC and MFA, it highlights that unexpected behaviors can occur with MFA configurations. If you've verified all these points and are still not being prompted for TOTP, I recommend reaching out to Ory support or opening an issue on the Ory Kratos GitHub repository. They may be able to provide more specific guidance based on your exact configuration and setup.