[daily] reset oauth proxy form after start (#311)

This commit is contained in:
Cita
2026-03-29 13:37:40 +08:00
committed by GitHub
parent ed44e7f925
commit ab8640c8c3
2 changed files with 145 additions and 0 deletions
+7
View File
@@ -165,6 +165,12 @@ export default function OAuthManagement() {
const [oauthProxyClearEnabled, setOauthProxyClearEnabled] = useState(false);
const [oauthProxyUrl, setOauthProxyUrl] = useState('');
const resetOauthProxySettings = () => {
setOauthProxyEnabled(false);
setOauthProxyClearEnabled(false);
setOauthProxyUrl('');
};
const loadConnections = async () => {
const response = await api.getOAuthConnections({
limit: CONNECTION_PAGE_LIMIT,
@@ -303,6 +309,7 @@ export default function OAuthManagement() {
authorizationUrl: started.authorizationUrl,
instructions: started.instructions,
});
resetOauthProxySettings();
openOAuthPopup(provider.provider, started.authorizationUrl);
} catch (error: any) {
setSessionMessage(error?.message || '无法启动 OAuth 授权');