Bug 36219: Re-add missing state param for Oauth/OIDC client
This change restores the csrf token added as the state param for the OAuth/OIDC client. Test plan: 0. Apply the patch and restart Starman 1. Test the SSO using the wiki guide Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
190ab37812
commit
c12cb8e3c5
1 changed files with 4 additions and 0 deletions
|
@ -94,6 +94,10 @@ sub login {
|
|||
return $c->redirect_to( $uri . "?auth_error=$error" );
|
||||
}
|
||||
}
|
||||
else {
|
||||
# initial request, generate CSRF token
|
||||
$state = Koha::Token->new->generate_csrf( { session_id => $c->req->cookie('CGISESSID')->value } );
|
||||
}
|
||||
|
||||
return $c->oauth2->get_token_p( $provider => { ( !$is_callback ? ( state => $state ) : () ), redirect_uri => $redirect_url . $provider . "/" . $interface } )->then(
|
||||
sub {
|
||||
|
|
Loading…
Reference in a new issue