Hello everyone! I am having problems following th...
# ory-network
f
Hello everyone! I am having problems following this guide: https://www.ory.sh/docs/getting-started/oauth2-openid/add-oauth2-openid-connect-nodejs-expressjs. I setup a new project with an oauth2-client following the commands of the tutorial. I am trying to adapt the code to @hono/oidc-auth, which in turn is based on oauth4webapi . It seems the authentication flow fails to start, since ory does not seem to return the correct scopes upon discovery (at least from my crude understanding). In the cli commands of the tutorial a scope "email" is created for the oauth2 client. I can see the scope in the oauth2-clients screen in the dashboard as well. However following the code, the discovery process of the library fetches
/.well-known/openid-configuration
, which does not return the same scopes as in the dashboard: the scope
email
is missing. If I modify the libraries' checks to ignore the missing email scope I get authenticated after login, but the email is missing from the userdata. Strangely enought, the express / express-openid-connect code works fine, and returns the email correctly (as shown by the JSON ouput). Is this a bug / configuration error in ory or an issue with the libraries in use? Why is ory not returning all the scopes in
/.well-known/openid-configuration
? Any guidance would be much appreciated, thanks in advance!
a
Did you end up figuring out how to do hydra + nextjs?