Skip to content

Conversation

@EleisonC
Copy link
Contributor

@EleisonC EleisonC commented Jan 11, 2026

What does this PR do?

  • This PR merges the changes from sprint-5, addressing Issue

Updated ClickUp Tasks (WIP)

Set up tracing 1.3 Instrument sign-up route handler

Idiomatic errors - part 1

Update error conversion to UserStoreError::UnexpectedError in PostgresUserStore. We need to pass an eyre::Report to UserStoreError::UnexpectedError.

Hiding sensitive data

Update the Password type to SecretString. This will prevent the password type from accidentally being logged!

Update auth-service/src/services/data-stores/postgres_user_store.rs to use the SecretString type

EleisonC and others added 5 commits November 11, 2025 14:03
* updates to sprint 2 deps and breaking changes

* move rand to dev deps

* changes after audit

* dependency updates

* Deps updates and refactor for breaking changes

* update deps and refactor breaking changes
* update to password struct impl

* new type hashpassword for user stored password

* remove hashpassword and refactor validate User

* validate_user fn change &string to &str and param name password to raw_password

* remove unnecessary clones

* change clone to owned in verify_password_hash

* add tokio::test to valid_passwords_are_parsed_successfully

* change Password to HashedPassword

* refactor verify_password_hash password_candidate to &str

* refactor compute_password_hash accept password: &str

* ch to verify_raw_password from  verify_password_hash
Email::parse(request.email.clone()).map_err(|_| AuthAPIError::InvalidCredentials)?;
let password =
Password::parse(request.password.clone()).map_err(|_| AuthAPIError::InvalidCredentials)?;
let email = Email::parse(request.email).map_err(|e| AuthAPIError::UnexpectedError(e.into()))?;
Copy link
Owner

@letsgetrusty letsgetrusty Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we changing this from InvalidCredentials to UnexpectedError?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this would break integration tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was an attempt to recreate the section of Err(eyre!("oh no!"))

Since the compute_password_hash was moved to password.rs.

I have reverted it to InvalidCredentials, but I have also added error source tracking to it.

@EleisonC
Copy link
Contributor Author

@letsgetrusty let me know if the commit I have pushed makes sense to you. Then I will also make the changes to ClickUp

@EleisonC EleisonC requested a review from letsgetrusty January 14, 2026 23:16
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 this pull request may close these issues.

2 participants