-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to integrate with ORCID's OIDC #237
Comments
There should be an error log entry strating with If there's no error log then I think it can show up if registration has been disabled or there are missing params. In the latter case it would be helpful to have the logger print a warning, I'll open a PR to fix this. |
If you update your deps with |
thanks @danschultzer it logs something now:
Not sure what's wrong but I'll try and look it up EDIT: Changed config to |
That's odd, you should definitely see an This error means that the cert is invalid. What URL are you using for ORCID OIDC (this |
Hi, Not sure I was clear before: your branch did expose a log which help me realize I had the I'm using a custom provider as follows:
and then in
in the server console all I see now (with the Mint adapter) is
Just a bunch of warnings between the two. Any clue as to why I'm seeing no errors? |
You should change the strategy base to OIDC: defmodule Paperlens.Orcid.OrcidProvider do
use Assent.Strategy.OIDC.Base
I think the TLS warning might have been a separate thing, not related to ORCID. I haven't been able to reproduce it accessing |
Just to rule out this registration isn't disabled (the only option for when you get redirected with no error log), how did you configure the pow assent routes look in your router module? |
Hi, The registration is not disabled. I also haven't changed anything in the router, it looks like this:
Is there something missing on my side of things? |
Found the issue! The disabled registration flag was on, because there is no router helpers enabled (with Phoenix 1.7 it's disabled and will likely be deprecated). The router helpers was used to detect whether registration is disabled. This has been resolved in #239. If you want to test it right away, you can use |
v0.4.17 released with this fix, thanks! FWIW the provider can be made super minimal: defmodule Paperlens.Orcid.OrcidProvider do
use Assent.Strategy.OIDC.Base
@impl true
def default_config(_config) do
[
site: "https://orcid.org",
client_authentication_method: "client_secret_post"
]
end
end config :paperlens, :pow_assent,
http_adapter: Assent.HTTPAdapter.Mint,
providers: [
orcid: [
client_id: System.get_env("ORCID_CLIENT_ID"),
client_secret: System.get_env("ORCID_CLIENT_SECRET"),
strategy: Paperlens.Orcid.OrcidProvider
]
] |
Glad I helped in some way :) I'll just suggest something here: listing phoenix supported versions on the readme file so one can immediately know whether something works 100% or still under testing. Anyway, good job! |
Yeah, it was supposed to work with 1.7. The deps version requirement on hex.pm shows which Pow/PowAssent version works with which Phoenix version. I just hadn’t updated the tests to the new helpers structure so everything seemed to work when I added 1.7 support 😬 |
Hi,
I'm trying to use pow to integrate with ORCID OIDC on a fresh 1.7.2 Phoenix project. I've created a custom provider module and I get to see the login page. However, as I fill in the credentials, I'm getting this error:
I can't see any error on the server, so I wonder if there's any debugging tip I could use in order to try and figure this out. I'm farly new to Elixir / Phoenix so any help is appreciated!
Thanks in advance.
The text was updated successfully, but these errors were encountered: