mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	fix(users): add bad request for openidconnect (#9244)
This commit is contained in:
		| @ -76,7 +76,14 @@ pub async fn get_user_email_from_oidc_provider( | |||||||
|         .exchange_code(oidc::AuthorizationCode::new(authorization_code.expose())) |         .exchange_code(oidc::AuthorizationCode::new(authorization_code.expose())) | ||||||
|         .request_async(|req| get_oidc_reqwest_client(state, req)) |         .request_async(|req| get_oidc_reqwest_client(state, req)) | ||||||
|         .await |         .await | ||||||
|         .change_context(UserErrors::InternalServerError) |         .map_err(|e| match e { | ||||||
|  |             oidc::RequestTokenError::ServerResponse(resp) | ||||||
|  |                 if resp.error() == &oidc_core::CoreErrorResponseType::InvalidGrant => | ||||||
|  |             { | ||||||
|  |                 UserErrors::SSOFailed | ||||||
|  |             } | ||||||
|  |             _ => UserErrors::InternalServerError, | ||||||
|  |         }) | ||||||
|         .attach_printable("Failed to exchange code and fetch oidc token")?; |         .attach_printable("Failed to exchange code and fetch oidc token")?; | ||||||
|  |  | ||||||
|     // Fetch id token from response |     // Fetch id token from response | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Rachit Naithani
					Rachit Naithani