Update config.template.yml to include TOTP issuer name

* Update config.template.yml and hook.ts

This fixes issue reported in #251.
This commit is contained in:
whiskerch 2018-08-19 09:59:47 +01:00 committed by Clément Michaud
parent 1617fab68e
commit 2b1807d32b
2 changed files with 10 additions and 3 deletions

View File

@ -22,6 +22,14 @@ logs_level: debug
# be redirected upon successful authentication. # be redirected upon successful authentication.
default_redirection_url: https://home.example.com:8080/ default_redirection_url: https://home.example.com:8080/
# TOTP Issuer Name
#
# This will be the issuer name displayed in Google Authenticator
# See: https://github.com/google/google-authenticator/wiki/Key-Uri-Format for more info on issuer names
totp:
issuer: authelia.com
# LDAP configuration # LDAP configuration
# #
# Example: for user john, the DN will be cn=john,ou=users,dc=example,dc=com # Example: for user john, the DN will be cn=john,ou=users,dc=example,dc=com

View File

@ -69,9 +69,8 @@ function createSingleFactorConfiguration(): BluebirdPromise<void> {
function createCustomTotpIssuerConfiguration(): BluebirdPromise<void> { function createCustomTotpIssuerConfiguration(): BluebirdPromise<void> {
return exec("\ return exec("\
cat config.template.yml > config.test.yml && \ cat config.template.yml | \
echo 'totp:' >> config.test.yml && \ sed 's/issuer: authelia.com/issuer: custom.com/' > config.test.yml \
echo ' issuer: custom.com' >> config.test.yml \
"); ");
} }