nhost / hasura-auth

Authentication for Hasura.
https://nhost.io
MIT License
372 stars 110 forks source link

Organization id not being forwarded to WorkOS #502

Closed mortenhillbom closed 2 months ago

mortenhillbom commented 2 months ago

WorkOS login does not work anymore.

From what I can see the issue is that Nhost endpoint signin/provider/Workos?organization=XXX redirects to

https://api.workos.com/sso/authorize?client_id=XXX&response_type=code&redirect_uri=XXX

which is missing the organization parameter. Changing this manually to

https://api.workos.com/sso/authorize?client_id=XXX&organization=XXX&response_type=code&redirect_uri=XXX

solves the issue, and redirects me to the proper IdP login screen.

In v 0.20.1 and the organization parameter used to be added, while switching to v 0.24.1, without changing any of the configuration, makes this not work anymore.

The organization id is sent through the nhost sdk like this

nhost.auth.signIn({
  provider: 'workos',
  options: {
    organization: orgId,
  },
})
dbarrosop commented 2 months ago

Thanks for the report, could you try the version 0.29.1?