Skip to content
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

How to fix "oauth.callback_url must be within a configured domains where the cookie will be sent" #527

Closed
aodhan-domhnaill opened this issue Mar 24, 2023 · 1 comment

Comments

@aodhan-domhnaill
Copy link

aodhan-domhnaill commented Mar 24, 2023

I want a simple localhost proxy running with Hydra. My docker-compose is mostly copied from #288,

  vouch:
    image: quay.io/vouch/vouch-proxy
    environment:
      - OAUTH_PROVIDER=oidc
      - OAUTH_CLIENT_ID=changeme
      - OAUTH_CLIENT_SECRET=changeme
      - OAUTH_AUTH_URL=http://localhost:3000/oauth2/auth
      - OAUTH_TOKEN_URL=http://localhost:3000/oauth2/token
      - OAUTH_USER_INFO_URL=http://localhost:3000/userinfo
      - OAUTH_END_SESSION_ENDPOINT=http://localhost:3000/oauth2/sessions/logout
      - OAUTH_scopes=openid,email,profile
      # Be sure to create your Ory Hydra oAuth2.0 client with the below URL as the --callbacks parameter.
      # Note that you will get errors if your client has multiple callback URLs registered and uses the 'pairwise' subject identifier.
      - OAUTH_CALLBACK_URL=http://localhost:3000/auth=value

I see that I require DNS.

# each of these domains must serve the url https://vouch.$domains[0] https://vouch.$domains[1] ...

Is there a way to resolve this for a simple local version?

vouch_1          | {"level":"info","ts":1679675695.5645263,"msg":"setting LogLevel to info"}
vouch_1          | {"level":"info","ts":1679675695.564551,"msg":"configuring oidc OAuth with Endpoint http://localhost:3000/oauth2/auth"}
vouch_1          | {"level":"warn","ts":1679675695.5645716,"msg":"Configuration Warning: for 'oauth.provider: oidc', 'oauth.scopes' should usually contain: -openid -email -profile"}
vouch_1          | {"level":"fatal","ts":1679675695.5646045,"msg":"configuration error: oauth.callback_url (http://localhost:3000/auth=value) must be within a configured domains where the cookie will be set: either `vouch.domains` [] or `vouch.cookie.domain` "}
@bnfinet
Copy link
Member

bnfinet commented Mar 30, 2023

@aodhan-domhnaill you'll need to add additional VP related configuration either using environmental variables or by mapping in a configuration file

Please consult the README

@bnfinet bnfinet closed this as completed Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants