nextauthjs / nextauthjs/next-auth

Using the Loops provider generates TS errors

Open
#12,897 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug providers triage
Dominant language
TypeScript
Stars
28.4k
Forks
4k
PR merge metrics
No merged PRs in 30d

Description

Provider type

Loops

Environment
  System:
    OS: macOS 15.3.2
    CPU: (10) arm64 Apple M1 Max
    Memory: 1.81 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v22.14.0/bin/yarn
    npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm
    pnpm: 10.6.3 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 135.0.7049.97
    Edge: 126.0.2592.87
    Safari: 18.3.1
  npmPackages:
    @auth/unstorage-adapter: ^2.0.0 => 2.9.0
    next: latest => 15.3.1
    next-auth: beta => 5.0.0-beta.26
    react: ^18.2.0 => 18.3.1
Reproduction URL

https://github.com/gfpacheco/next-auth-loops-bug

Describe the issue

Using the Loops provider generates TypeScript errors:

Type 'LoopsConfig' is not assignable to type 'Provider'.
  Type 'LoopsConfig' is not assignable to type 'EmailConfig & InternalProviderOptions'.
    Type 'LoopsConfig' is not assignable to type 'EmailConfig'.
      Types of property 'sendVerificationRequest' are incompatible.
        Type '(params: Params) => Promise<void>' is not assignable to type '(params: EmailProviderSendVerificationRequestParams) => Awaitable<void>'.
          Types of parameters 'params' and 'params' are incompatible.
            Type 'EmailProviderSendVerificationRequestParams' is not assignable to type 'Params'.
              Type 'EmailProviderSendVerificationRequestParams' is not assignable to type '{ provider: LoopsConfig; }'.
                Types of property 'provider' are incompatible.
                  Property 'transactionalId' is missing in type 'EmailConfig' but required in type 'LoopsConfig'.
How to reproduce

Just try to use the Loops provider, TypeScript will say the types are wrong.

Expected behavior

Using the Loops provider shouldn't trigger any TS errors.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Loops provider entry point in the next-auth source and compare its sendVerificationRequest parameter type with the provider type shown in the error. Use the reproduction repository to run TypeScript checking; done means the Loops provider can be configured without the reported type error.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.