Update lib/ueberauth/strategy/icynet.ex, lib/ueberauth/strategy/icynet/oauth.ex

This commit is contained in:
Evert Prants 2022-09-17 08:14:41 +00:00
parent 2cd5727dfa
commit 1bbc75e8d7
2 changed files with 5 additions and 5 deletions

View File

@ -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")])

View File

@ -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
]