Update lib/ueberauth/strategy/icynet.ex, lib/ueberauth/strategy/icynet/oauth.ex
This commit is contained in:
parent
2cd5727dfa
commit
1bbc75e8d7
@ -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:
|
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.
|
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
|
defp fetch_user(conn, token) do
|
||||||
conn = put_private(conn, :icynet_token, token)
|
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}} ->
|
{:ok, %OAuth2.Response{status_code: 401, body: _body}} ->
|
||||||
set_errors!(conn, [error("token", "unauthorized")])
|
set_errors!(conn, [error("token", "unauthorized")])
|
||||||
|
|
||||||
|
@ -12,9 +12,9 @@ defmodule Ueberauth.Strategy.IcyNet.OAuth do
|
|||||||
|
|
||||||
@defaults [
|
@defaults [
|
||||||
strategy: __MODULE__,
|
strategy: __MODULE__,
|
||||||
site: "https://icynet.eu",
|
site: "https://secure.icynet.eu",
|
||||||
authorize_url: "https://icynet.eu/oauth2/authorize",
|
authorize_url: "https://secure.icynet.eu/oauth2/authorize",
|
||||||
token_url: "https://icynet.eu/oauth2/token",
|
token_url: "https://secure.icynet.eu/oauth2/token",
|
||||||
token_method: :post
|
token_method: :post
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user