Skip to content

Mailgun Provider needs option for EU server (domain is different) #12925

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

Open
HexaCubist opened this issue Apr 29, 2025 · 1 comment
Open

Mailgun Provider needs option for EU server (domain is different) #12925

HexaCubist opened this issue Apr 29, 2025 · 1 comment
Labels
bug Something isn't working providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@HexaCubist
Copy link

Provider type

Email

Environment

  System:
    OS: macOS 15.4.1
    CPU: (8) arm64 Apple M1
    Memory: 108.25 MB / 16.00 GB
    Shell: 4.0.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 20.15.1 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.7.0 - /usr/local/bin/npm
    bun: 1.2.4 - ~/.bun/bin/bun
  Browsers:
    Chrome: 135.0.7049.115
    Safari: 18.4
  npmPackages:
    @auth/drizzle-adapter: ^1.9.0 => 1.9.0 
    @auth/sveltekit: ^1.9.1 => 1.9.1

Reproduction URL

https://github.com/HexaCubist/next-auth-mailgun-eu

Describe the issue

Mailgun has two regions to send from since 2018: https://www.mailgun.com/about/regions/

API keys can be created for one region only, and the US region is hard-coded into the provider:

  • US Domain: api.mailgun.net
  • EU Domain: api.eu.mailgun.net

mailgun.ts:

...
      const res = await fetch(`https://api.mailgun.net/v3/${domain}/messages`, {
...

How to reproduce

  1. Clone repo
  2. Provide EU API keys for Mailgun
  3. Error:
[auth][error] Error: Mailgun error: Forbidden

Expected behavior

Mailgun provider should have configurable option to select region (EU or US), defaulting to the US.

@HexaCubist HexaCubist added bug Something isn't working providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Apr 29, 2025
@HexaCubist
Copy link
Author

Related: #11923

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

No branches or pull requests

1 participant