-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
bugSomething isn't workingSomething isn't workingproviderstriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Description
Provider type
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
- Clone repo
- Provide EU API keys for Mailgun
- 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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingproviderstriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
HexaCubist commentedon Apr 29, 2025
Related: #11923
benhovinga commentedon Jun 3, 2025
Possible solution to this issue. This follows a similar setup to the Microsoft Entra ID
profilePhotoSize
.In
packages/core/src/providers/mailgun.ts
When setting up the provider you would just need to include the region in the config