Skip to content

Commit

Permalink
Add client_id to logout params
Browse files Browse the repository at this point in the history
Fixes an error on keycloak ( there either `client_id` or
`id_token_hint` is required)

Fixes: indico#62
  • Loading branch information
bpedersen2 committed Dec 5, 2024
1 parent 3d4e2c6 commit adc4ba9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flask_multipass/providers/authlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ def process_logout(self, return_url):
logout_uri = self.authlib_client.load_server_metadata().get('end_session_endpoint')
if logout_uri:
return_url = urljoin(request.url_root, return_url)
query = urlencode({'post_logout_redirect_uri': return_url})
client_id = self.authlib_settings['client_id']
query = urlencode({'post_logout_redirect_uri': return_url, 'client_id': client_id})
return redirect(logout_uri + '?' + query)

@login_view
Expand Down

0 comments on commit adc4ba9

Please sign in to comment.