From 1bbc75e8d7f3a4a652de4d88566356e78dcc8034 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Sat, 17 Sep 2022 08:14:41 +0000 Subject: [PATCH] Update lib/ueberauth/strategy/icynet.ex, lib/ueberauth/strategy/icynet/oauth.ex --- lib/ueberauth/strategy/icynet.ex | 4 ++-- lib/ueberauth/strategy/icynet/oauth.ex | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ueberauth/strategy/icynet.ex b/lib/ueberauth/strategy/icynet.ex index 412d507..75645ba 100644 --- a/lib/ueberauth/strategy/icynet.ex +++ b/lib/ueberauth/strategy/icynet.ex @@ -80,7 +80,7 @@ defmodule Ueberauth.Strategy.IcyNet do To customize the scope (permissions) that are requested by icynet include them as part of your url: - "/auth/icynet?scope=email,image,privilege" + "/auth/icynet?scope=email,image,privileges" You can also include a `state` param that icynet will return to you. """ @@ -182,7 +182,7 @@ defmodule Ueberauth.Strategy.IcyNet do defp fetch_user(conn, token) do conn = put_private(conn, :icynet_token, token) - case Ueberauth.Strategy.IcyNet.OAuth.get(token, "/oauth2/user") do + case Ueberauth.Strategy.IcyNet.OAuth.get(token, "/api/user") do {:ok, %OAuth2.Response{status_code: 401, body: _body}} -> set_errors!(conn, [error("token", "unauthorized")]) diff --git a/lib/ueberauth/strategy/icynet/oauth.ex b/lib/ueberauth/strategy/icynet/oauth.ex index f69f0b7..6603758 100644 --- a/lib/ueberauth/strategy/icynet/oauth.ex +++ b/lib/ueberauth/strategy/icynet/oauth.ex @@ -12,9 +12,9 @@ defmodule Ueberauth.Strategy.IcyNet.OAuth do @defaults [ strategy: __MODULE__, - site: "https://icynet.eu", - authorize_url: "https://icynet.eu/oauth2/authorize", - token_url: "https://icynet.eu/oauth2/token", + site: "https://secure.icynet.eu", + authorize_url: "https://secure.icynet.eu/oauth2/authorize", + token_url: "https://secure.icynet.eu/oauth2/token", token_method: :post ]