feat(oauth): Add option to logout from OpenID Connect provider

* Fixes #598

Signed-off-by: Marvin A. Ruder <signed@mruder.dev>
This commit is contained in:
Marvin A. Ruder
2024-10-14 18:16:47 +02:00
committed by GitHub
parent 104cc06145
commit 2b3ce3ffd2
15 changed files with 88 additions and 15 deletions

View File

@@ -29,8 +29,10 @@ const signUp = async (email: string, username: string, password: string) => {
};
const signOut = async () => {
await api.post("/auth/signOut");
window.location.reload();
const response = await api.post("/auth/signOut");
if (URL.canParse(response.data?.redirectURI)) window.location.href = response.data.redirectURI;
else window.location.reload();
};
const refreshAccessToken = async () => {