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

Sdk credentials #19749

Merged
merged 4 commits into from
Sep 20, 2023
Merged

Sdk credentials #19749

merged 4 commits into from
Sep 20, 2023

Conversation

br41nslug
Copy link
Member

A recent fix added a default value for fetch credentials but some edge fetch implementations do not support the credentials option resulting in errors.
#19354

This improvement removes all the defaulted values for credentials and instead only adds it to the fetch options if explicitly defined in the config.

A partial workaround for those running into this:

const client = createDirectus(...)
  .with(rest({
    onRequest: (opts) => {
      delete opts.credentials;
    }
  })

@changeset-bot
Copy link

changeset-bot bot commented Sep 20, 2023

🦋 Changeset detected

Latest commit: ffc051f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@directus/sdk Patch

Not sure what this means? Click here to learn what changesets are.

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

@br41nslug br41nslug requested review from a team, paescuj, jaads and azrikahar and removed request for a team September 20, 2023 14:45
Copy link
Member

@paescuj paescuj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@rijkvanzanten rijkvanzanten merged commit 02d7bcc into main Sep 20, 2023
6 checks passed
@rijkvanzanten rijkvanzanten deleted the sdk-credentials branch September 20, 2023 15:51
@github-actions github-actions bot added this to the Next Release milestone Sep 20, 2023
Copy link
Member

@connorwinston connorwinston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

br-rafaelbarros pushed a commit to personal-forks/directus-source that referenced this pull request Nov 7, 2023
* removed defaulted fetch credentials option in authentication

* removed defaulted fetch credentials option in graphql

* removed defaulted fetch credentials option in rest

* Create twelve-boxes-teach.md
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants