File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
crates/handlers/src/upstream_oauth2 Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1+ # Rust
12target /
3+
4+ # Editors
5+ .idea
6+ .nova
7+
8+ # OS garbage
9+ .DS_Store
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use hyper::StatusCode;
1212use mas_axum_utils:: { cookies:: CookieJar , record_error} ;
1313use mas_data_model:: UpstreamOAuthProvider ;
1414use mas_oidc_client:: requests:: authorization_code:: AuthorizationRequestData ;
15- use mas_router:: UrlBuilder ;
15+ use mas_router:: { PostAuthAction , UrlBuilder } ;
1616use mas_storage:: {
1717 BoxClock , BoxRepository , BoxRng ,
1818 upstream_oauth2:: { UpstreamOAuthProviderRepository , UpstreamOAuthSessionRepository } ,
@@ -92,6 +92,15 @@ pub(crate) async fn get(
9292 data = data. with_response_mode ( response_mode. into ( ) ) ;
9393 }
9494
95+ // Forward the raw login hint upstream for the provider to handle however it sees fit
96+ if let Some ( post_auth_action) = & query. post_auth_action {
97+ if let PostAuthAction :: ContinueAuthorizationGrant { id } = post_auth_action {
98+ if let Some ( grant) = repo. oauth2_authorization_grant ( ) . lookup ( * id) . await ? {
99+ data. login_hint = grant. login_hint ;
100+ }
101+ }
102+ }
103+
95104 let data = if let Some ( methods) = lazy_metadata. pkce_methods ( ) . await ? {
96105 data. with_code_challenge_methods_supported ( methods)
97106 } else {
You can’t perform that action at this time.
0 commit comments