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

Add basicauth support to gatsby-source-drupal #9848

Merged
merged 4 commits into from
Nov 16, 2018
Merged

Add basicauth support to gatsby-source-drupal #9848

merged 4 commits into from
Nov 16, 2018

Conversation

gatis
Copy link
Contributor

@gatis gatis commented Nov 9, 2018

I have a business case where we need to build gatsby page from drupal webiste that is protected by basicauth (Basic access authentication). Since axios already supports it I slightly modified the gatsby-source-drupal code to enable it. Please see if you can implement this feature as proposed in this PR or similar manner.

@pieh
Copy link
Contributor

pieh commented Nov 9, 2018

I think this make sense - only thing is that

auth: {
  username: 'thisismyvery',
  password: 'simplepassword'
}

might seem like these are credentials to drupal admin - might be worth to use more descriptive fields like htaccess_username or rename auth to basicAuth? Another request would be to not put plain string in your example of usage - please replace them with process.env.BASIC_AUTH_USERNAME or something like this (we don't want to "encourage" users of using secrets as plain text).

Copy link
Contributor

@pieh pieh left a comment

Choose a reason for hiding this comment

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

Thanks @gatis!

@pieh pieh merged commit e208134 into gatsbyjs:master Nov 16, 2018
@gatsbot
Copy link

gatsbot bot commented Nov 16, 2018

Holy buckets, @gatis — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. (Currently we’ve got a couple t-shirts available, plus some socks that are really razzing our berries right now.)
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
I have a business case where we need to build gatsby page from drupal webiste that is protected by basicauth (Basic access authentication). Since axios already supports it I slightly modified the gatsby-source-drupal code to enable it. Please see if you can implement this feature as proposed in this PR or similar manner.
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.

2 participants