From 85545aba62546f219a9c9730945511412a3174ef Mon Sep 17 00:00:00 2001 From: jloup Date: Fri, 4 May 2018 11:55:15 +0200 Subject: Password reset. --- cmd/app/conf.toml | 3 +++ cmd/app/main.go | 11 +++++------ 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'cmd/app') diff --git a/cmd/app/conf.toml b/cmd/app/conf.toml index 13e3e0b..16087e5 100644 --- a/cmd/app/conf.toml +++ b/cmd/app/conf.toml @@ -16,6 +16,9 @@ database=0 [api] domain="localhost" jwt_secret="secret" +password_reset_secret="resetsecret" +free_sms_user="20996747" +free_sms_pass="bM2ZPETB4zzWg3" [app] public_dir="../web/build/static" diff --git a/cmd/app/main.go b/cmd/app/main.go index 65e8b5a..a0463d2 100644 --- a/cmd/app/main.go +++ b/cmd/app/main.go @@ -21,8 +21,8 @@ type AppConfig struct { } type ApiConfig struct { - Domain string `toml:"domain"` - JwtSecret string `toml:"jwt_secret"` + api.Config + Domain string `toml:"domain"` } type Config struct { @@ -45,9 +45,6 @@ func (c *Config) SetToDefaults() { App: AppConfig{ PublicDir: "./public", }, - Api: ApiConfig{ - JwtSecret: "secret", - }, } c.LogConfiguration.SetToDefaults() @@ -63,7 +60,7 @@ func init() { panic(err) } - api.SetJwtSecretKey(C.Api.JwtSecret) + api.SetConfig(C.Api.Config) db.Init(C.Db, C.Redis) @@ -142,6 +139,8 @@ func main() { "/", "/signup", "/signin", + "/reset-password", + "/change-password", "/signout", "/me", "/otp/enroll", -- cgit v1.2.3