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

organization_id is nil error #18

Open
dpep opened this issue Apr 13, 2022 · 2 comments
Open

organization_id is nil error #18

dpep opened this issue Apr 13, 2022 · 2 comments

Comments

@dpep
Copy link

dpep commented Apr 13, 2022

Hey, I'm working through the ruby sso example app and could use some help. I set up Google OAuth credentials, configured my WorkOS dashboard, and got the app running. The login button sends me to Google, which sends me back to localhost, which explodes with:
Parameter 'organization_id': Can't set WorkOS::Types::ProfileStruct.organization_id to nil

this is in the /auth handler: https://github.com/workos/ruby-example-applications/blob/main/ruby-sso-example/app.rb#L50

further down the stack:
response = client.request(post_request(path: '/sso/token', body: body)) (code) returns 422 Unprocessable Entity when I ran it in a debugger

The app does work with your Okta dummy org, which suggests I've got the fundamentals in place. Any ideas on how to get Google OAuth working?

image

@maxdeviant
Copy link

maxdeviant commented Apr 14, 2022

Hey @dpep!

It looks like example app is using an older version of the WorkOS Ruby SDK; the organization_id on the Profile is now nullable, which is supported starting in v2.0.0 of the SDK.

You should be able to upgrade to the latest version (v2.2.0 at time of writing) to get past this error.

We'll take a look at getting these examples updated with the latest version of the SDK as well.

@dpep dpep mentioned this issue Apr 14, 2022
@dpep
Copy link
Author

dpep commented Apr 14, 2022

good tip! indeed, I upgraded the gem per your suggestion and the app works: #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants