fix: hide admin password
This commit is contained in:
parent
ff80014c2f
commit
cccd5d5969
|
|
@ -254,7 +254,7 @@ async fn setup_admin_account(
|
|||
gotrue_setting: &GoTrueSetting,
|
||||
) -> Result<GoTrueAdmin, Error> {
|
||||
let admin_email = gotrue_setting.admin_email.as_str();
|
||||
let password = gotrue_setting.admin_password.as_str();
|
||||
let password = gotrue_setting.admin_password.expose_secret();
|
||||
let gotrue_admin = GoTrueAdmin::new(admin_email.to_owned(), password.to_owned());
|
||||
|
||||
let res_resp = gotrue_client.sign_up(admin_email, password, None).await;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ pub struct GoTrueSetting {
|
|||
pub ext_url: String, // public url
|
||||
pub jwt_secret: Secret<String>,
|
||||
pub admin_email: String,
|
||||
pub admin_password: String,
|
||||
pub admin_password: Secret<String>,
|
||||
}
|
||||
|
||||
// We are using 127.0.0.1 as our host in address, we are instructing our
|
||||
|
|
@ -104,7 +104,7 @@ pub fn get_configuration() -> Result<Config, anyhow::Error> {
|
|||
ext_url: get_env_var("APPFLOWY_GOTRUE_EXT_URL", "http://localhost:9999"),
|
||||
jwt_secret: get_env_var("APPFLOWY_GOTRUE_JWT_SECRET", "hello456").into(),
|
||||
admin_email: get_env_var("APPFLOWY_GOTRUE_ADMIN_EMAIL", "admin@example.com"),
|
||||
admin_password: get_env_var("APPFLOWY_GOTRUE_ADMIN_PASSWORD", "password"),
|
||||
admin_password: get_env_var("APPFLOWY_GOTRUE_ADMIN_PASSWORD", "password").into(),
|
||||
},
|
||||
application: ApplicationSetting {
|
||||
port: get_env_var("APPFLOWY_APPLICATION_PORT", "8000").parse()?,
|
||||
|
|
|
|||
Loading…
Reference in New Issue