traewelling oauth: pass HTTP redirect_uri in development mode

This commit is contained in:
Birte Kristina Friesel 2023-08-09 19:26:25 +02:00
parent db7e5faaf4
commit 3ec9970f01
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

@ -26,8 +26,10 @@ sub oauth {
return $self->oauth2->get_token_p( return $self->oauth2->get_token_p(
traewelling => { traewelling => {
redirect_uri => $self->base_url_for('/oauth/traewelling') redirect_uri =>
->to_abs->scheme('https')->to_string, $self->base_url_for('/oauth/traewelling')->to_abs->scheme(
$self->app->mode eq 'development' ? 'http' : 'https'
)->to_string,
scope => 'read-statuses write-statuses' scope => 'read-statuses write-statuses'
} }
)->then( )->then(