aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/register.rs
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2021-05-09 20:11:17 +0100
committerGitHub <noreply@github.com>2021-05-09 20:11:17 +0100
commite43e5ce74a85d87a625295b9b089a1b5b8e26fab (patch)
treeafbc97503090e320250440160a8ea9ee775fc170 /src/command/register.rs
parentFix resh importer crashing on end of file (#92) (diff)
downloadatuin-e43e5ce74a85d87a625295b9b089a1b5b8e26fab.zip
Add logout, only login if not already logged in (#91)
Also: - Ensures that a key is generated as soon as a user registers! - Ensures that "atuin key" will generate a key if needed, and doesn't double base64 encode data And a few other little fixes :) Resolves #85 Resolves #86
Diffstat (limited to 'src/command/register.rs')
-rw-r--r--src/command/register.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/command/register.rs b/src/command/register.rs
index acf9b1a3..7c38f483 100644
--- a/src/command/register.rs
+++ b/src/command/register.rs
@@ -27,5 +27,8 @@ pub fn run(settings: &Settings, username: &str, email: &str, password: &str) ->
let mut file = File::create(path)?;
file.write_all(session.session.as_bytes())?;
+ // Create a new key, and save it to disk
+ let _key = atuin_client::encryption::new_key(settings)?;
+
Ok(())
}