mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-18 10:59:17 +00:00
[#2025] Defaulted OAuth login scopes choice to all scopes when user selects no scopes.
This commit is contained in:
parent
10b0e55acf
commit
135ae4e35a
|
@ -76,6 +76,13 @@ defp do_authorize(%Plug.Conn{} = conn, params) do
|
|||
available_scopes = (app && app.scopes) || []
|
||||
scopes = Scopes.fetch_scopes(params, available_scopes)
|
||||
|
||||
scopes =
|
||||
if scopes == [] do
|
||||
available_scopes
|
||||
else
|
||||
scopes
|
||||
end
|
||||
|
||||
# Note: `params` might differ from `conn.params`; use `@params` not `@conn.params` in template
|
||||
render(conn, Authenticator.auth_template(), %{
|
||||
response_type: params["response_type"],
|
||||
|
|
Loading…
Reference in a new issue