Skip to content

Unable to use Prisma Adapter with AzureADProvider #4907

@ThisIsRuddy

Description

@ThisIsRuddy

Adapter type

@next-auth/prisma-adapter

Environment

System:
OS: Linux 5.10 Ubuntu 20.04.3 LTS (Focal Fossa)
CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
Memory: 35.86 GB / 37.53 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.15 - ~/.yarn/bin/yarn
npm: 8.5.4 - ~/.nvm/versions/node/v16.13.0/bin/npm
npmPackages:
next: ^12.1.6 => 12.2.0
next-auth: ^4.9.0 => 4.9.0
react: ^18.1.0 => 18.2.0

npmPackages:
@next-auth/prisma-adapter: ^1.0.3 => 1.0.3

Reproduction URL

https://github.com/ThisIsRuddy/na-p-azad-error

Describe the issue

Hi,

Using the Prisma adapter with Google/Email providers is working as expected but when using the AzureADProvider there seems to be an error triggered.

The User record is created in the db but no Account record is created. If you attempt to log in again you are prompted with the message "To confirm your identity, sign in with the same account you used originally." which makes no difference unless you delete the User record again.

It is worth mentioning the AzureADProvider is working as expected for me when not paired with the adapter.

image
image

How to reproduce

Use a Prisma adapter with a valid AzureADProvider and attempt to sign in

Expected behavior

User & Account equivalent records should be created

Metadata

Metadata

Assignees

No one assigned

    Labels

    adaptersChanges related to the core code concerning database adaptersprisma@auth/prisma-adaptertriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions