mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-31 14:33:18 +02:00
Support id_token for OAuth 2.0
https://feedback.yaak.app/p/unable-to-use-idtoken-for-auth-in-authorization-code-oauth2
This commit is contained in:
@@ -530,6 +530,7 @@ impl PluginManager {
|
||||
InternalEventPayload::EmptyResponse(_) => {
|
||||
Err(PluginErr("Auth plugin returned empty".to_string()))
|
||||
}
|
||||
InternalEventPayload::ErrorResponse(e) => Err(PluginErr(e.error)),
|
||||
e => Err(PluginErr(format!("Auth plugin returned invalid event {:?}", e))),
|
||||
}
|
||||
}
|
||||
@@ -601,6 +602,7 @@ impl PluginManager {
|
||||
InternalEventPayload::EmptyResponse(_) => {
|
||||
Err(PluginErr("Auth plugin returned empty".to_string()))
|
||||
}
|
||||
InternalEventPayload::ErrorResponse(e) => Err(PluginErr(e.error)),
|
||||
e => Err(PluginErr(format!("Auth plugin returned invalid event {:?}", e))),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,9 +87,9 @@ impl PluginRuntimeServerWebsocket {
|
||||
// Parse everything but the payload so we can catch errors on that, specifically
|
||||
let payload = serde_json::from_value::<InternalEventPayload>(event.payload.clone())
|
||||
.unwrap_or_else(|e| {
|
||||
warn!("Plugin error from {}: {:?} {}", event.plugin_name, e, event.payload);
|
||||
warn!("Plugin event parse error from {}: {:?} {}", event.plugin_name, e, event.payload);
|
||||
InternalEventPayload::ErrorResponse(ErrorResponse {
|
||||
error: format!("Plugin error from {}: {e:?}", event.plugin_name),
|
||||
error: format!("Plugin event parse error from {}: {e:?}", event.plugin_name),
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user