-
Notifications
You must be signed in to change notification settings - Fork 0
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
auth のすべて #90
auth のすべて #90
Conversation
f94df83
to
5a310c0
Compare
server/src/traq/auth/impl.rs
Outdated
let code = req_ | ||
.uri() | ||
.query() | ||
.ok_or(super::Error::InvalidRequest("missing query".to_string()))? | ||
.split('&') | ||
.find(|s| s.starts_with("code=")) | ||
.ok_or(super::Error::InvalidRequest("missing code".to_string()))? | ||
.split('=') | ||
.nth(1) | ||
.ok_or(super::Error::InvalidRequest("missing code".to_string()))?; |
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.
ここ絶対まずいのでaxum::extract::Query
使いましょう
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.
探してた~
server/src/traq/auth/impl.rs
Outdated
let pool = ctx.as_ref(); | ||
let traq_host: &crate::traq::TraqHost = ctx.as_ref(); | ||
|
||
oauth2_handle_redirect(client, req_client.clone(), req, ctx, pool, &traq_host.0).boxed() |
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.
req_client
のclone
必要なくないですか
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.
LGTM
No description provided.