summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-08-09 19:26:25 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-08-09 19:26:25 +0200
commit3ec9970f01b7641eaf8787905b423aaa41ea71bc (patch)
treea3982f2ca0ed100ce758cc1d07fa582d006b2852 /lib
parentdb7e5faaf49e32edcef28e271e0016c82ea0f7ca (diff)
traewelling oauth: pass HTTP redirect_uri in development mode
Diffstat (limited to 'lib')
-rw-r--r--lib/Travelynx/Controller/Traewelling.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Travelynx/Controller/Traewelling.pm b/lib/Travelynx/Controller/Traewelling.pm
index f1f24e7..6df4e52 100644
--- a/lib/Travelynx/Controller/Traewelling.pm
+++ b/lib/Travelynx/Controller/Traewelling.pm
@@ -26,8 +26,10 @@ sub oauth {
return $self->oauth2->get_token_p(
traewelling => {
- redirect_uri => $self->base_url_for('/oauth/traewelling')
- ->to_abs->scheme('https')->to_string,
+ redirect_uri =>
+ $self->base_url_for('/oauth/traewelling')->to_abs->scheme(
+ $self->app->mode eq 'development' ? 'http' : 'https'
+ )->to_string,
scope => 'read-statuses write-statuses'
}
)->then(