From 887632c824089fabc8ef2b49bf32bc8630fb4d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janko=20Marohni=C4=87?= Date: Mon, 18 Nov 2024 10:27:09 +0100 Subject: [PATCH] Add guide for configuring case insensitive logins --- doc/guides/case_insensitive_logins.rdoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 doc/guides/case_insensitive_logins.rdoc diff --git a/doc/guides/case_insensitive_logins.rdoc b/doc/guides/case_insensitive_logins.rdoc new file mode 100644 index 00000000..ccfa6771 --- /dev/null +++ b/doc/guides/case_insensitive_logins.rdoc @@ -0,0 +1,13 @@ += Case insensitive logins + +If your database schema doesn't support case insensitive logins, you can tell +Rodauth to automatically lowercase login param values during authentication and +persistence via the +normalize_login+ configuration option: + + normalize_login(&:downcase) + +Of the four database types Rodauth officially supports (PostgreSQL, MySQL, +Microsoft SQL Server, and SQLite), only SQLite does not support a case +insensitive column for storing logins by default. However, other databases could +be configured to not use a case insensitive column for logins by default, in +which case you would want to use this setting.