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

Password reset functionality #101

Open
dustinmoris opened this issue Jul 22, 2024 · 3 comments
Open

Password reset functionality #101

dustinmoris opened this issue Jul 22, 2024 · 3 comments
Labels
core Related to core enhancement New feature or request

Comments

@dustinmoris
Copy link

Is there a way to reset the password or configure it through a config file or environment variables so it can be rotated periodically?

@ayuhito ayuhito added the question Further information is requested label Jul 22, 2024
@ayuhito
Copy link
Member

ayuhito commented Jul 22, 2024

You can update your password in Settings > Account and that should reset your password. Alternatively, there's an API endpoint to do it programmatically as long as you are already authenticated.

I'm not keen on having it set through a config file or environment variables due to its unencrypted nature. In the future I probably would want to add multiple user support and more access controls (e.g. encrypting the database file itself), so having the ability to set the password without any authorization may not be a safe feature to have.

Are you rotating passwords manually or programmatically through some app?

@dustinmoris
Copy link
Author

That makes sense, I would rotate them probably manually for my use case for now as a solo dev. What steps can someone go through if they forget their password after resetting the default one?

Thank you for open sourcing this by the way, it's the best GA4 replacement which I've found and I have evaluated A LOT :)

Really nice work 👍

I actually like this project so much that if you ever need a hand in getting some features implemented I'd be more than happy to contribute my manual labour and submit PRs.

@ayuhito
Copy link
Member

ayuhito commented Jul 25, 2024

What steps can someone go through if they forget their password after resetting the default one?

That's a good point, I don't think my previous idea is very feasible. There has to be some way to reset the password locally since we can't do anything fancy like email verification (that would only happen if I ever make a private fork and go down the cloud managed hosting route). And I don't plan on ever adding anything that requires emails to keep the self-hosted implementation super simple.

What are your thoughts on a CLI command? e.g. ./<executable> set password my_new_password

Thank you for open sourcing this by the way, it's the best GA4 replacement which I've found and I have evaluated A LOT :)

Really appreciate the kind words, it is super motivating to hear. 😄 I plan on working on this for the long-term so hope it ticks more checkboxes in the future!

I actually like this project so much that if you ever need a hand in getting some features implemented I'd be more than happy to contribute my manual labour and submit PRs.

PRs are always welcome! If you ever feel like you want to work on any feature or fix, just let me know and we can talk about it! The Discord is an easy place to reach me.

In fact, this feature would be very small and simple to add too if you're interested.

CLI command logic:
https://github.com/medama-io/medama/blob/main/core/cmd/main.go#L44

Example of how to hash password and update user:
https://github.com/medama-io/medama/blob/main/core/migrations/0001_sqlite_schema.go#L72

@ayuhito ayuhito added enhancement New feature or request core Related to core and removed question Further information is requested labels Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants