-
Notifications
You must be signed in to change notification settings - Fork 542
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
Added WorldId provider #819
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial comments, but if this is a very new service provider and still in beta then I don't think we'd actually want to have to integrate and support this at this stage.
src/AspNet.Security.OAuth.WorldID/AspNet.Security.OAuth.WorldID.csproj
Outdated
Show resolved
Hide resolved
src/AspNet.Security.OAuth.WorldID/WorldIDAuthenticationOptions.cs
Outdated
Show resolved
Hide resolved
src/AspNet.Security.OAuth.WorldID/WorldIDAuthenticationConstants.cs
Outdated
Show resolved
Hide resolved
test/AspNet.Security.OAuth.Providers.Tests/WorldID/WorldIDTests.cs
Outdated
Show resolved
Hide resolved
The provider is not in beta, but already have production applications and support and more than 2.5 million unique humans are already in the platform. Indeed, those 2 properties ( |
Thanks for your PR, @sandrohanea! To match the naming rules used by the .NET team (e.g |
They are using the name World ID, but I understand that in this package, it would be better alligned if WorldId is used (without the capital D), so I renamed it. |
@sandrohanea did you try the provider? I tried adding an OpenIddict web integration for WorldID and all I get is a 500 response at the token request stage. Apparently, WorldID seems to crash when you specify a |
2 other remarks:
|
src/AspNet.Security.OAuth.WorldId/WorldIDAuthenticationDefaults.cs
Outdated
Show resolved
Hide resolved
I don't think it supports PKCE currently: https://docs.worldcoin.org/reference/sign-in#exchange-code Regarding:
Yes, I tried the provider with both staging app and production app, worked correctly for this OAuth2 approach. |
src/AspNet.Security.OAuth.WorldId/WorldIdAuthenticationDefaults.cs
Outdated
Show resolved
Hide resolved
It's not documented but the OIDC discovery document (https://id.worldcoin.org/.well-known/openid-configuration) lists "code_challenge_methods_supported":["S256"]
Weird. I'll give it another try: it's not normal to get a 500 error when the BTW, how do you authenticate when using a staging app? Do you need a special iOS/Android app or is there a setting somewhere? |
I was curious so I tried your provider and I get exactly the same error without changing anything to the code: HTTP/1.1 500 Internal Server Error
Date: Thu, 21 Dec 2023 16:18:12 GMT
Content-Length: 0
Connection: keep-alive
Cache-Control: public, max-age=0, must-revalidate
Content-Security-Policy: default-src 'self'; script-src 'self' 'nonce-7f4aa660-c53d-4374-80d7-c69df8393d88' 'strict-dynamic'; font-src 'self' https://world-id-public.s3.amazonaws.com; style-src 'self' 'unsafe-inline' fonts.googleapis.com; connect-src 'self' https://app.posthog.com https://docs.worldcoin.org https://status.worldcoin.org https://developer.worldcoin.org https://rum.browser-intake-datadoghq.com https://bridge.worldcoin.org; img-src 'self' https://worldcoin.org https://world-id-public.s3.amazonaws.com
Strict-Transport-Security: max-age=63072000
Vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Url
X-Matched-Path: /oidc-route
X-Vercel-Cache: MISS
X-Vercel-Execution-Region: iad1
X-Vercel-Id: cdg1::iad1::9v64t-1703175491891-796b4fd8448b
CF-Cache-Status: DYNAMIC
Server: cloudflare
CF-RAY: 839170882c1f7028-CDG Which manifests as a JSON exception with your provider since the body is empty:
If I replay the same request without the @martincostello I suggest we wait to merge this provider, at least until Worldcoin fixes this issue on their end. |
After re-reading the documentation, it seems they just don't support the standard If we want to merge this provider, we'll need to override the token request phase to avoid sending the |
Doing some housecleaning but feel free to reopen if you're still interested in working on this provider. |
Hello,
Added a provider for World ID.
I hope I didn't miss anything as it's my first time adding a provider here.