Skip to content

Commit 37b398b

Browse files
authored
chore: disable supertokens debug logs during development (#617)
1 parent 231628e commit 37b398b

File tree

1 file changed

+5
-1
lines changed
  • api/internal/features/supertokens

1 file changed

+5
-1
lines changed

api/internal/features/supertokens/auth.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,12 @@ func Init(appInstance *storage.App) {
7373
apiBasePath := "/auth"
7474
websiteBasePath := "/auth"
7575

76+
// Disable debug logs in development mode
77+
isDevelopment := strings.ToLower(config.App.Environment) == "development" || strings.ToLower(config.App.Environment) == "dev"
78+
debugEnabled := !isDevelopment
79+
7680
err := supertokens.Init(supertokens.TypeInput{
77-
Debug: true,
81+
Debug: debugEnabled,
7882
Supertokens: &supertokens.ConnectionInfo{
7983
ConnectionURI: config.Supertokens.ConnectionURI,
8084
APIKey: config.Supertokens.APIKey,

0 commit comments

Comments
 (0)