improvement: add icon field to OAuth2 strategy. (#100)

This commit is contained in:
James Harton 2022-12-16 13:53:03 +13:00 committed by GitHub
parent 02fe19091b
commit 74dfbf7595
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -700,7 +700,8 @@ defmodule AshAuthentication.Dsl do
auth_method: :client_secret_post,
authorize_path: "/authorize",
token_path: "/oauth/token",
user_path: "/userinfo"
user_path: "/userinfo",
icon: :auth0
]
})
end

View file

@ -237,7 +237,8 @@ defmodule AshAuthentication.Strategy.OAuth2 do
identity_relationship_user_id_attribute: :user_id,
provider: :oauth2,
name: nil,
resource: nil
resource: nil,
icon: nil
alias AshAuthentication.Strategy.OAuth2
@ -267,6 +268,7 @@ defmodule AshAuthentication.Strategy.OAuth2 do
identity_relationship_user_id_attribute: atom,
provider: atom,
name: atom,
resource: module
resource: module,
icon: nil | atom
}
end