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

Update documentation to reflect the usage of the account email #56

Closed
luckylwk opened this issue Nov 8, 2023 · 1 comment
Closed

Update documentation to reflect the usage of the account email #56

luckylwk opened this issue Nov 8, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@luckylwk
Copy link

luckylwk commented Nov 8, 2023

It wasn't clear to us when using this that the API Token would not be used as a Bearer token when also providing the email address. Removing the email address immediately resolved the issue.

const headers = accountEmail
? {
'X-Auth-Key': token,
'X-Auth-Email': accountEmail
}
: {
Authorization: `Bearer ${token}`
}

@PatrickHeneise
Copy link
Member

Thanks for the feedback. It's been a while, but I think that depends on what account type you have? For my own website I use:

- name: cloudflare-preview-url
  uses: zentered/cloudflare-preview-url@v1.4.0
  id: cloudflare_preview_url
  env:
    CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
    CLOUDFLARE_ACCOUNT_EMAIL: ${{ secrets.CLOUDFLARE_ACCOUNT_EMAIL }}
    CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
  with:
    cloudflare_project_id: ''
    wait_until_ready: true

Which works fine; Is that a documentation issue or has something changed in Cloudflare API auth that I should be aware of?

@PatrickHeneise PatrickHeneise self-assigned this Nov 8, 2023
@PatrickHeneise PatrickHeneise added the bug Something isn't working label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants