ory / docs

The Ory documentation
https://www.ory.sh/docs
Apache License 2.0
136 stars 381 forks source link

Update the example protect page login #758

Closed kantum closed 2 years ago

kantum commented 2 years ago

Preflight checklist

Describe the bug

In the documentation, the example code does not work with a self-hosted kratos

https://www.ory.sh/docs/guides/protect-page-login/go#validate-and-login

I had to change this part of middleware.go

        // this will redirect the user to the managed Ory Login UI
            http.Redirect(writer, request, "/.ory/api/kratos/public/self-service/login/browser", http.StatusSeeOther)

to

        // this will redirect the user to the managed Ory Login UI
            http.Redirect(writer, request, "/.ory/login", http.StatusSeeOther)

It may be a good idea to update the documentation under the Self-Hosted Ory Kratos tab

Reproducing the bug

Follow the instruction under of protect-page-login under the Self-Hosted Ory Kratos

Relevant log output

No response

Relevant configuration

No response

Version

v0.9.0-alpha.3

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Docker Compose

Additional Context

No response

aeneasr commented 2 years ago

@Benehiko can you take a look when you have some time?