mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-19 16:10:59 +00:00
Merge branch '2025-oauth-login-default-to-all-scopes' into 'develop'
[#2025] Defaulted OAuth login scopes choice to all scopes when user selects no scopes Closes #2025 See merge request pleroma/pleroma!2855
This commit is contained in:
commit
b9ebb55d2a
1 changed files with 7 additions and 0 deletions
|
@ -76,6 +76,13 @@ defmodule Pleroma.Web.OAuth.OAuthController do
|
||||||
available_scopes = (app && app.scopes) || []
|
available_scopes = (app && app.scopes) || []
|
||||||
scopes = Scopes.fetch_scopes(params, available_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
|
# Note: `params` might differ from `conn.params`; use `@params` not `@conn.params` in template
|
||||||
render(conn, Authenticator.auth_template(), %{
|
render(conn, Authenticator.auth_template(), %{
|
||||||
response_type: params["response_type"],
|
response_type: params["response_type"],
|
||||||
|
|
Loading…
Reference in a new issue