2022-09-28 10:04:04 +13:00
|
|
|
import Config
|
|
|
|
|
|
|
|
config :git_ops,
|
|
|
|
mix_project: Mix.Project.get!(),
|
|
|
|
changelog_file: "CHANGELOG.md",
|
|
|
|
repository_url: "https://github.com/team-alembic/ash_authentication",
|
|
|
|
manage_mix_version?: true,
|
2023-02-24 16:15:30 +13:00
|
|
|
manage_readme_version: [
|
|
|
|
"README.md",
|
|
|
|
"documentation/tutorials/getting-started-with-authentication.md"
|
|
|
|
],
|
2022-09-28 10:04:04 +13:00
|
|
|
version_tag_prefix: "v"
|
2022-10-25 11:07:07 +13:00
|
|
|
|
|
|
|
config :ash_authentication, DevServer, start?: true, port: 4000
|
|
|
|
|
|
|
|
config :ash_authentication, ecto_repos: [Example.Repo], ash_apis: [Example]
|
|
|
|
|
|
|
|
config :ash_authentication, Example.Repo,
|
|
|
|
username: "postgres",
|
|
|
|
password: "postgres",
|
|
|
|
hostname: "localhost",
|
|
|
|
database: "ash_authentication_dev",
|
|
|
|
stacktrace: true,
|
|
|
|
show_sensitive_data_on_connection_error: true,
|
|
|
|
pool_size: 10
|
|
|
|
|
|
|
|
config :ash_authentication, Example,
|
|
|
|
resources: [
|
|
|
|
registry: Example.Registry
|
|
|
|
]
|
|
|
|
|
2022-11-23 09:09:41 +13:00
|
|
|
config :ash_authentication,
|
|
|
|
authentication: [
|
|
|
|
strategies: [
|
|
|
|
oauth2: [
|
|
|
|
client_id: System.get_env("OAUTH2_CLIENT_ID"),
|
|
|
|
redirect_uri: "http://localhost:4000/auth",
|
|
|
|
client_secret: System.get_env("OAUTH2_CLIENT_SECRET"),
|
|
|
|
site: System.get_env("OAUTH2_SITE"),
|
2023-01-12 17:23:40 +13:00
|
|
|
authorize_url: "#{System.get_env("OAUTH2_SITE")}/authorize",
|
|
|
|
token_url: "#{System.get_env("OAUTH2_SITE")}/oauth/token",
|
|
|
|
user_url: "#{System.get_env("OAUTH2_SITE")}/userinfo"
|
2022-12-16 13:06:51 +13:00
|
|
|
],
|
|
|
|
auth0: [
|
|
|
|
client_id: System.get_env("OAUTH2_CLIENT_ID"),
|
|
|
|
redirect_uri: "http://localhost:4000/auth",
|
|
|
|
client_secret: System.get_env("OAUTH2_CLIENT_SECRET"),
|
|
|
|
site: System.get_env("OAUTH2_SITE")
|
2023-01-12 17:23:40 +13:00
|
|
|
],
|
|
|
|
github: [
|
|
|
|
client_id: System.get_env("GITHUB_CLIENT_ID"),
|
|
|
|
client_secret: System.get_env("GITHUB_CLIENT_SECRET"),
|
|
|
|
redirect_uri: "http://localhost:4000/auth"
|
2022-11-23 09:09:41 +13:00
|
|
|
]
|
2022-12-09 11:32:34 +13:00
|
|
|
],
|
|
|
|
tokens: [
|
|
|
|
signing_secret: "Marty McFly in the past with the Delorean"
|
2022-11-23 09:09:41 +13:00
|
|
|
]
|
|
|
|
]
|
2023-01-19 11:32:37 +13:00
|
|
|
|
|
|
|
# config :ash_authentication, debug_authentication_failures?: true
|
2023-01-30 13:16:37 +13:00
|
|
|
|
|
|
|
config :ash_authentication, extra_strategies: [Example.OnlyMartiesAtTheParty]
|