1
0

redirect to oidc provider if configured correctly (#2805)

Co-authored-by: konrad <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/2805
Reviewed-by: konrad <k@knt.li>
Co-authored-by: viehlieb <pf@pragma-shift.net>
Co-committed-by: viehlieb <pf@pragma-shift.net>
This commit is contained in:
viehlieb
2023-01-11 21:17:53 +00:00
committed by konrad
parent 61592a3c33
commit b719766062
3 changed files with 17 additions and 1 deletions

View File

@ -17,3 +17,8 @@ export const redirectToProvider = (provider: IProvider, redirectUrl = '') => {
window.location.href = `${provider.authUrl}?client_id=${provider.clientId}&redirect_uri=${redirectUrl}${provider.key}&response_type=code&scope=openid email profile&state=${state}`
}
export const redirectToProviderOnLogout = (provider: IProvider) => {
if (provider.logoutUrl.length > 0){
window.location.href = `${provider.logoutUrl}`
}
}