We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following line is not working anymore in https://www.ory.sh/docs/getting-started/integrate-auth/go#create-http-server with 1.8.0
// dashboard mux.Handle("/", app.sessionMiddleware(app.dashboardHandler()))
I am using Go 1.22
The text was updated successfully, but these errors were encountered:
https://www.ory.sh/docs/kratos/sdk/go is also incorrect. I propose this
package web import ( "context" "fmt" "os" "github.com/ory/client-go" ) type oryMiddleware struct { *client.APIClient } func NewOryMiddleware() *oryMiddleware { cfg := client.NewConfiguration() cfg.Servers = client.ServerConfigurations{ {URL: fmt.Sprintf("https://%s.projects.oryapis.com", os.Getenv("ORY_PROJECT_SLUG"))}, } return &oryMiddleware{client.NewAPIClient(cfg)} } func NewOryMiddleware() *oryMiddleware { cfg := client.NewConfiguration() cfg.Servers = client.ServerConfigurations{ {URL: fmt.Sprintf("https://%s.projects.oryapis.com", os.Getenv("ORY_PROJECT_SLUG"))}, } return &oryMiddleware{client.NewAPIClient(cfg)} } func createLogin(ctx context.Context, ory *oryMiddleware) (*client.LoginFlow, error) { flow, _, err := ory.FrontendAPI.CreateBrowserLoginFlow(ctx).Execute() if err != nil { return nil, err } return flow, nil } func createRegistration(ctx context.Context, ory *oryMiddleware) (*client.RegistrationFlow, error) { flow, _, err := ory.FrontendAPI.CreateNativeRegistrationFlow(ctx).Execute() if err != nil { return nil, err } return flow, nil } func CreateRecovery(ctx context.Context, ory *oryMiddleware) (*client.RecoveryFlow, error) { flow, _, err := ory.FrontendAPI.CreateNativeRecoveryFlow(ctx).Execute() if err != nil { return nil, err } return flow, nil }
Sorry, something went wrong.
No branches or pull requests
The following line is not working anymore in https://www.ory.sh/docs/getting-started/integrate-auth/go#create-http-server with 1.8.0
I am using Go 1.22
The text was updated successfully, but these errors were encountered: