Skip to content

Commit eeb66a8

Browse files
committed
Add button to reset default auth choice in Authenticating dialog
Introduced a button that clears the `opensvc.authChoice` value from local storage and reloads the page. This allows users to unset their default authentication method gracefully.
1 parent 1a0fe21 commit eeb66a8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/js/components/Authenticating.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ import Button from '@mui/material/Button'
99

1010
function Authenticating(props) {
1111
const {i18n, t} = useTranslation()
12+
const resetDefaultAuthChoice = () => {
13+
localStorage.setItem("opensvc.authChoice", "")
14+
window.location.reload()
15+
}
16+
1217
return (
1318
<Dialog
1419
open={true}
@@ -26,6 +31,9 @@ function Authenticating(props) {
2631
<Button onClick={() => location.reload()}>
2732
{t("Reload")}
2833
</Button>
34+
<Button onClick={resetDefaultAuthChoice}>
35+
{t("Reset authentication method")}
36+
</Button>
2937
</DialogActions>
3038
</Dialog>
3139
)

0 commit comments

Comments
 (0)