mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-26 11:06:23 +00:00
feat: add email verification and password reset functionality
- Introduced environment variables for database and email configurations. - Implemented email verification code generation and validation. - Added password reset feature with email verification. - Updated user registration and profile management APIs. - Refactored user security settings to include email and password updates. - Enhanced console layout with internationalization support. - Removed deprecated settings page and integrated global settings. - Added new reset password page and form components. - Updated localization files for new features and translations.
This commit is contained in:
@ -19,6 +19,23 @@ const (
|
||||
EnvKeyCaptchaSecreteKey = "CAPTCHA_SECRET_KEY" // captcha站点密钥
|
||||
EnvKeyCaptchaUrl = "CAPTCHA_URL" // 某些自托管的captcha的url
|
||||
EnvKeyCaptchaSiteKey = "CAPTCHA_SITE_KEY" // captcha密钥key
|
||||
EnvKeyDBDriver = "DB_DRIVER" // 环境变量:数据库驱动
|
||||
EnvKeyDBPath = "DB_PATH" // 环境变量:数据库文件路径(仅适用于SQLite)
|
||||
EnvKeyDBHost = "DB_HOST" // 环境变量:数据库主机(仅适用于PostgreSQL)
|
||||
EnvKeyDBPort = "DB_PORT" // 环境变量:数据库端口(仅适用于PostgreSQL)
|
||||
EnvKeyDBUser = "DB_USER" // 环境变量:数据库用户(仅适用于PostgreSQL)
|
||||
EnvKeyDBPassword = "DB_PASSWORD" // 环境变量:数据库密码(仅适用于PostgreSQL)
|
||||
EnvKeyDBName = "DB_NAME" // 环境变量:数据库名称(仅适用于PostgreSQL)
|
||||
EnvKeyDBSSLMode = "DB_SSLMODE" // 环境变量:数据库SSL模式(仅适用于PostgreSQL)
|
||||
EnvKeyEmailAddress = "EMAIL_ADDRESS"
|
||||
EnvKeyEmailEnable = "EMAIL_ENABLE"
|
||||
EnvKeyEmailHost = "EMAIL_HOST"
|
||||
EnvKeyEmailPort = "EMAIL_PORT"
|
||||
EnvKeyEmailUsername = "EMAIL_USERNAME"
|
||||
EnvKeyEmailPassword = "EMAIL_PASSWORD"
|
||||
EnvKeyEmailSsl = "EMAIL_SSL"
|
||||
EnvKeyEnableRegister = "ENABLE_REGISTER"
|
||||
EnvKeyEnableEmailVerify = "ENABLE_EMAIL_VERIFY"
|
||||
EnvKeyFileDriverType = "FILE_DRIVER_TYPE"
|
||||
EnvKeyFileBasepath = "FILE_BASEPATH"
|
||||
EnvKeyFileWebdavUrl = "FILE_WEBDAV_URL"
|
||||
@ -39,6 +56,8 @@ const (
|
||||
FileDriverTypeLocal = "local"
|
||||
FileDriverTypeWebdav = "webdav"
|
||||
FileDriverTypeS3 = "s3"
|
||||
HeaderKeyEmail = "X-Email"
|
||||
HeaderKeyVerifyCode = "X-VerifyCode"
|
||||
KVKeyEmailVerificationCode = "email_verification_code:" // KV存储:邮箱验证码
|
||||
KVKeyOidcState = "oidc_state:" // KV存储:OIDC状态
|
||||
ApiSuffix = "/api/v1" // API版本前缀
|
||||
@ -46,6 +65,7 @@ const (
|
||||
OidcProviderTypeMisskey = "misskey" // OIDC提供者类型:Misskey
|
||||
OidcProviderTypeOauth2 = "oauth2" // OIDC提供者类型:GitHub
|
||||
DefaultBaseUrl = "http://localhost:3000" // 默认BaseUrl
|
||||
DefaultPasswordSalt = "default_salt_114514"
|
||||
TargetTypePost = "post"
|
||||
TargetTypeComment = "comment"
|
||||
WebdavPolicyProxy = "proxy"
|
||||
|
Reference in New Issue
Block a user