Skip to content

Fix custom oauth client #872

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

Merged
merged 4 commits into from
Jan 26, 2024
Merged

Fix custom oauth client #872

merged 4 commits into from
Jan 26, 2024

Conversation

matt-aitken
Copy link
Member

Closes #856

The value of the checkbox wasn't coming through because we'd set it to "disabled". I had assumed that the value came through still in the form data… but it doesn't. So now we set the checkbox to readonly instead, I modified the checkbox component so it behaves nicely and is styled properly too.

I have tested with custom OAuth clients.

Note that CLOUD_ENV=development should NOT be used by anyone self-hosting Trigger.dev. It controls a bunch of things specific to the cloud, including communication with some private services. We intentionally don't document this environment variable anywhere. If you don't have this set the form should behave correctly for you, and force you to add custom OAuth clients each time.

Copy link

changeset-bot bot commented Jan 26, 2024

⚠️ No Changeset found

Latest commit: 792a644

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@matt-aitken
Copy link
Member Author

@erin-allison this fix is simpler than your PR and is now behaving as I originally designed it too 🤦 Basically the checkbox was set to disabled so wasn't coming through in the form data. I've tested it works.

Make sure you remove CLOUD_ENV from your environment variables, self-hosters shouldn't be using this.

@erin-allison
Copy link
Contributor

Yep, this way works too - I just know that there is no OOTB "read-only" option on checkboxes, and wasn't familiar enough with the UI side of things to try and implement this approach

@matt-aitken
Copy link
Member Author

It's crazy that there isn't built-in support for readonly on a checkbox…

@matt-aitken matt-aitken merged commit af485b9 into main Jan 26, 2024
@matt-aitken matt-aitken deleted the fix-custom-oauth-client branch January 26, 2024 17:25
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

Successfully merging this pull request may close these issues.

bug: Unable to Add OAuth Integrations when Self-Hosting
2 participants