-
Notifications
You must be signed in to change notification settings - Fork 177
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
Moving recovery code APIs under /identity and using POST #1492
Conversation
axum::Router::new() | ||
.route("/request_recovery_code", post(request_recovery_code::<S>)) | ||
.route("/confirm_recovery_code", post(confirm_recovery_code::<S>)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this a separate Router
rather than just being part of the existing one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was following the pattern of database's control/worker routes, but yeah merging them has the same effect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think this merging makes sense, thank you. I did a bit of investigating and it seems like even in database.rs
the distinction isn't important anymore.
@lcodes It looks like the smoketests are failing, but I don't think it has anything to do with this PR - can you update with latest Unfortunately, I don't think there's a way to test this recovery flow locally, so we'll have to merge and test it once deployed that has SendGrid enabled. |
27434b5
to
6bc2019
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me! Let's try to remember to test this once it lands somewhere with SendGrid enabled.
b944987
to
906b2ec
Compare
Description of Changes
#1372
Added
control_routes
to identity, based off database's.Moved the recovery code APIs there.
Switched them to expect POST.
API and ABI breaking changes
Changes both the request method and the router endpoints of the recovery code API.
Expected complexity level and risk
0
Testing
Assuming the previous handler code is correct, this validates the routes and request method switches.