Hi, I'm attempting to use my application's API lay...
# talk-kratos
d
Hi, I'm attempting to use my application's API layer as a reverse proxy to catch login failures, logout events, and SSO events (not retrievable from the kratos webhook). I've created the following rule for login:
Copy code
{
  "id": "kratos:login",
  "upstream": {
    "url": "<http://my-application>"
  },
  "match": {
    "url": "<http|https>://<(.*).?localhost|127.0.0.1><:?><[[:digit:]]*>/login<.*>",
    "methods": [
      "POST",
      "OPTIONS",
      "GET"
    ]
  },
  "authenticators": [
    {
      "handler": "noop"
    }
  ],
  "authorizer": {
    "handler": "allow"
  },
  "mutators": [
    {
      "handler": "noop"
    }
  ]
}
Whenever I navigate to
127.0.0.1:8081
I see the welcome screen, I click Sign In, I enter invalid userID and password, and I see the following error message:
{"errors":[{"error_type":"Unauthorized","code":401}]}
. In docker logs I see the 401 error when I navigate to the initial welcome URL (code snippet incoming). Has anyone experienced this behavior before?