Files
hanko/backend/test/config.go
Frederic Jahn c9684d1fe9 fix: create session in DB for old endpoints (#2052)
* fix: create session in DB for old endpoints

The old endpoints do not store the session in the DB, this leads to an unauthorized error in old hanko elements versions prior 1.0.0 when any endpoint is called that requires a session because they check if the session is stored in the DB.

* test: fix test
2025-02-14 21:00:38 +01:00

54 lines
1.1 KiB
Go

package test
import "github.com/teamhanko/hanko/backend/config"
var DefaultConfig = config.Config{
Webauthn: config.WebauthnSettings{
RelyingParty: config.RelyingParty{
Id: "localhost",
DisplayName: "Test Relying Party",
Icon: "",
Origins: []string{"http://localhost:8080", "http://localhost:8888"},
},
Timeout: 60000,
UserVerification: "preferred",
},
Secrets: config.Secrets{
Keys: []string{"abcdefghijklmnop"},
},
Email: config.Email{
Enabled: true,
UseForAuthentication: true,
},
EmailDelivery: config.EmailDelivery{
Enabled: true,
SMTP: config.SMTP{
Host: "localhost",
Port: "2500",
},
FromAddress: "test@hanko.io",
FromName: "Hanko Test",
},
Passcode: config.Passcode{
TTL: 300,
},
Session: config.Session{
Lifespan: "1h",
Cookie: config.Cookie{
SameSite: "none",
},
Limit: 5,
},
Service: config.Service{
Name: "Test",
},
Account: config.Account{
AllowSignup: true,
AllowDeletion: false,
},
Passkey: config.Passkey{
Enabled: true,
UserVerification: "preferred",
},
}