Skip to content
Snippets Groups Projects
Commit fe01ccd9 authored by Ralf Klammer's avatar Ralf Klammer
Browse files

new: change default `redirect_uri` to be always current `pathname`, see #180 & #177

parent f6c6b891
No related branches found
No related tags found
No related merge requests found
......@@ -14,13 +14,15 @@ interface LoginOutButtonProps {
}
export const LoginOutButton = (props: LoginOutButtonProps) => {
const redirect_uri = settings.KEYCLOAK_REDIRECT_URL + window.location.pathname;
let { login_redirect_uri, logout_redirect_uri } = props;
if(! login_redirect_uri) {
login_redirect_uri = settings.KEYCLOAK_REDIRECT_URL + "/label/my_repositories";
login_redirect_uri = redirect_uri;
}
if(! logout_redirect_uri) {
logout_redirect_uri = settings.KEYCLOAK_REDIRECT_URL + "/label";
logout_redirect_uri = redirect_uri;
}
const auth = useAuth();
return (
<Flex>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment