From 54a3cec17c1c2bdd2cce5bb09f21902812cd9dd1 Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Fri, 15 Jan 2021 22:57:31 +0000 Subject: [PATCH] Fix auth code extraction Cut off get request at the & if provided. This fixes logins for Pleroma. --- src/Util.elm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Util.elm b/src/Util.elm index 93564c0..f5f67b7 100644 --- a/src/Util.elm +++ b/src/Util.elm @@ -24,7 +24,9 @@ extractAuthCode : Navigation.Location -> Maybe String extractAuthCode { search } = case (String.split "?code=" search) of [ _, authCode ] -> - Just authCode + authCode + |> String.split "&" + |> List.head _ -> Nothing