Hello, I have an issue with my instance on Ory Net...
# ory-network
f
Hello, I have an issue with my instance on Ory Network: After signing-up or signin-in with a password, I can't load the settings flow. I get a 403 on
/self-service/settings/browser
with a
aal1
session, and my user did not setup MFA yet. My current config looks like this
Copy code
selfservice:
  flows:
    settings:
      required_aal: highest_available
# ...
session:
  whoami:
    required_aal: aal1
According to this documentation I understand that I should be able to load the settings flow with a
aal1
session while MFA is not setup. Can you help me understand what's going on ? My project id is
37f4eaf2-c2f2-46da-ba16-e1e1e4fc8c1c
b
What's the response body from the 403 response? And do you use email OTP for MFA?
f
Here is the body response:
Copy code
{
  "error": {
    "id": "session_aal2_required",
    "code": 403,
    "status": "Forbidden",
    "reason": "An active session was found but it does not fulfill the requested Authenticator Assurance Level. Please verify yourself with a second factor to resolve this issue.",
    "details": {
      "redirect_browser_to": "<http://localhost:4200/self-service/login/browser?aal=aal2>"
    },
    "message": "Session does not fulfill the requested Authenticator Assurance Level"
  },
  "redirect_browser_to": "<http://localhost:4200/self-service/login/browser?aal=aal2>"
}
It says that session does not fulfill the requested AAL, but I'm using an account that did not setup MFA yet
I'm using both TOTP or SMS for MFA
b
If you have configured SMS for MFA a second factor is available for the session so, this works as intended AFAICT.
f
No because the at this point there is no phone number in the user's traits. My workflow is the following: 1)The user signs up with email & password (phone number is empty in traits at this step) 2) The user sets up MFA (phone number OR totp): he loads a settings flow => this is where I get the 403. How could the user get a aal2 session if he did not fill his phone number yet ?
b
Hm, I see. What's your identity schema?
f
Copy code
{
  "$schema": "<http://json-schema.org/draft-07/schema#>",
  "$id": "<https://schemas.ory.sh/presets/kratos/identity.email.schema.json>",
  "title": "Person",
  "type": "object",
  "properties": {
    "traits": {
      "type": "object",
      "properties": {
        "first_name": {
          "title": "First Name",
          "type": "string"
        },
        "last_name": {
          "title": "Last Name",
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email",
          "title": "E-Mail",
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "password": {
                "identifier": true
              },
              "webauthn": {
                "identifier": true
              },
              "totp": {
                "account_name": true
              }
            },
            "recovery": {
              "via": "email"
            },
            "verification": {
              "via": "email"
            }
          },
          "maxLength": 320
        },
        "phoneNumber": {
          "type": "string",
          "format": "tel",
          "title": "Phone Number",
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "code": {
                "identifier": true,
                "via": "sms"
              }
            },
            "verification": {
              "via": "sms"
            }
          }
        },
        "preferences": {
          "type": "object",
          "properties": {
            "locale": {
              "type": "string",
              "title": "Locale",
              "enum": [
                "en",
                "fr"
              ]
            },
            "theme": {
              "type": "string",
              "title": "Theme",
              "enum": [
                "light",
                "dark",
                "system"
              ]
            }
          },
          "required": [
            "locale",
            "investorAppMode"
          ],
          "additionalProperties": false
        },
        "referralCode": {
          "title": "Referral code",
          "type": "string"
        }
      },
      "required": [
        "first_name",
        "last_name",
        "email",
        "preferences"
      ],
      "additionalProperties": false
    }
  }
}
b
Okay, this could be a bug. Could you create an issue in github.com/ory/network? We will take a look there. Thank you!
f
Hi @bland-eye-99092 I have just created an issue : https://github.com/ory/network/issues/409