roflbobl

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

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

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

roflbobl

Thank you so much!

Where Next?

Popular in Questions Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 130579 1222
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42576 114
New

We're in Beta

About us Mission Statement