#[SSO] Cross-Origin Request Blocked

4 messages · Page 1 of 1 (latest)

graceful creek
#

Hi,
I've configured an OAuth 2.0: https://docs.directus.io/self-hosted/config-options.html#sso-oauth2-and-openid provider with my own authentik: https://goauthentik.io/ server.

When I try to log in, the connection through authentic goes fine but I'm getting Wrong username or password on directus. When I look at the logs I see a lot of connections being blocked because of CORS.

I've tried to set my CORS_ORIGIN env var to "array:https://authentik.example.com,https://directus.example.com" but it didn't help.

Is there something else I can do ?

Thanks,

Making authentication simple.

round adderBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please help us help you making sure you:

  • Adding an explanation of exactly what you're trying to achieve.
  • Adding any and all related code or previous attempts.
  • Describing the exact issue or error you are facing.
  • Posting any screenshots if applicable.
  • Reading through https://stackoverflow.com/help/how-to-ask.

When you're done with this thread, please close it. Thanks! ✨

(If you have a support agreement and need help, please contact the core team via email.)

lean mortar
#

@graceful creek I have these two envs in docker compose file

      CORS_ENABLED: true
      CORS_ORIGIN: false
#

Not sure if that will work for you, but it solved my CORS issues.
Is it the best solution? I have no idea.