• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mirego / accent / #785

21 Mar 2025 02:02PM UTC coverage: 76.157% (+0.5%) from 75.67%
#785

push

github

simonprev
Fix types

2271 of 2982 relevant lines covered (76.16%)

23.65 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.14
/lib/web/controllers/auth_controller.ex
1
defmodule Accent.AuthController do
2
  use Phoenix.Controller
3

4
  alias Accent.UserRemote.Authenticator
5
  alias Ueberauth.Strategy.Helpers
6

7
  plug(:ueberauth)
8

9
  def request(conn, _params) do
10
    redirect(conn, external: Helpers.callback_url(conn))
×
11
  end
12

13
  def callback(%{assigns: %{ueberauth_auth: auth}} = conn, _) do
14
    case Authenticator.authenticate(auth) do
2✔
15
      {:ok, token} ->
16
        conn
17
        |> put_session(:user_id, token.user_id)
2✔
18
        |> redirect(to: "/?auth=" <> token.user_id)
2✔
19

20
      _ ->
21
        redirect(conn, to: "/")
×
22
    end
23
  end
24

25
  def callback(conn, _) do
26
    redirect(conn, to: "/")
1✔
27
  end
28

29
  def ueberauth(conn, _) do
30
    Ueberauth.call(conn, Ueberauth.init())
×
31
  end
32
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc