View | Details | Raw Unified | Return to bug 36219
Collapse All | Expand All

(-)a/Koha/REST/V1/OAuth/Client.pm (-1 / +4 lines)
Lines 94-99 sub login { Link Here
94
            return $c->redirect_to( $uri . "?auth_error=$error" );
94
            return $c->redirect_to( $uri . "?auth_error=$error" );
95
        }
95
        }
96
    }
96
    }
97
    else {
98
        # initial request, generate CSRF token
99
        $state = Koha::Token->new->generate_csrf( { session_id => $c->req->cookie('CGISESSID')->value } );
100
    }
97
101
98
    return $c->oauth2->get_token_p( $provider => { ( !$is_callback ? ( state => $state ) : () ), redirect_uri => $redirect_url . $provider . "/" . $interface } )->then(
102
    return $c->oauth2->get_token_p( $provider => { ( !$is_callback ? ( state => $state ) : () ), redirect_uri => $redirect_url . $provider . "/" . $interface } )->then(
99
        sub {
103
        sub {
100
- 

Return to bug 36219