roflbobl
How to disable https for oidcc/ueberauth
Currently im trying to implement ueberauth_oidcc where i am using a local keycloak server as identity provider.
Since i’m developing locally i use http, but I get this error when starting my app:
Error Details: {:configuration_load_failed, {:invalid_config_property, {:uri_https, :userinfo_endpoint}}}
The error is quite clear, I need to use https. But I can’t for the life of me figure out how to disable this check locally when im developing. I followed this tutorial: UeberauthOidcc — Ueberauth OIDCC v0.4.2
Hope someone can help me.
This is my dev.exs
config :ueberauth_oidcc, :issuers, [
%{
name: :oidcc_issuer,
issuer: "http://localhost:8080/realms/my-realm"
}
]
config :ueberauth, Ueberauth,
providers: [
oidc: {
Ueberauth.Strategy.Oidcc,
# Additional HTTP tolerance
issuer: :oidcc_issuer,
client_id: "my-realm-phoenix",
client_secret: "my-secret",
scopes: ["openid", "profile", "email"],
callback_path: "/auth/callback",
userinfo: false,
validate_scopes: false,
uid_field: "email",
}
]
Marked As Solved
LostKobrakai
config :ueberauth_oidcc, :issuers, [
%{
name: :oidcc_issuer,
issuer: "http://localhost:8080/realms/my-realm",
provider_configuration_opts: %{
quirks: %{allow_unsafe_http: true}
}
}
]
This should work based on the typespecs on Oidcc.ProviderConfiguration.Worker — Oidcc v3.7.2, which is what the library uses: lib/ueberauth_oidcc/application.ex · main · Paul Swartz / ueberauth_oidcc · GitLab
Also Liked
LostKobrakai
oidcc has an option for providers: oidcc_provider_configuration — Oidcc v3.7.2
Not sure how you’d pass that when using the ueberauth strategy though.
Last Post!
roflbobl
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









