Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key creation order #85

Closed
ClashTheBunny opened this issue May 9, 2021 · 4 comments · Fixed by #91
Closed

Key creation order #85

ClashTheBunny opened this issue May 9, 2021 · 4 comments · Fixed by #91

Comments

@ClashTheBunny
Copy link

I found the key creation order to be a little confusing. It isn't created when you register, but when you sync the first time. So I tried to register, then login, and I couldn't find where the key was that I needed to use.

@conradludgate
Copy link
Collaborator

conradludgate commented May 9, 2021

Yes it's a little confusing at the moment. I think atuin register and atuin login should maybe be a bit more explicit, where they both say whether the user has been logged in and where the session file was created

@ellie
Copy link
Member

ellie commented May 9, 2021

I can totally see how this is confusing - right now key creation is "lazy". This should probably be changed so that keys are created upon registration (if not already existing)

For now, if you need to access the key it might be best to use atuin key, rather than try and access the file directly, it'll ensure that the file is created if it doesn't already exist.

@ClashTheBunny
Copy link
Author

Key just tries to read the key and then errors out:
https://github.com/ellie/atuin/blob/bd4db1fa038bc338f2b608858c2ffd3c25e0abe7/src/command/mod.rs#L145

@ellie
Copy link
Member

ellie commented May 9, 2021

I stand corrected! Sorry about that, I'll get it sorted

ellie added a commit that referenced this issue May 9, 2021
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
ellie added a commit that referenced this issue May 9, 2021
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
@ellie ellie closed this as completed in #91 May 9, 2021
ellie added a commit that referenced this issue May 9, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants