Skip to content

Prisma + Slack fails on linkAccount #3818

@stubbzilla8

Description

@stubbzilla8

Title

Prisma + Slack fails on linkAccount

How to reproduce ☕️

Use prisma and slack in a project.

When trying to log in you should get an error like so...

Unknown arg ok in data.ok for type AccountUncheckedCreateInput. Did you mean id? Available args:
type AccountUncheckedCreateInput {
id?: String
userId: String
type: String
provider: String
providerAccountId: String
refresh_token?: String | Null
access_token?: String | Null
expires_at?: Int | Null
token_type?: String | Null
scope?: String | Null
id_token?: String | Null
session_state?: String | Null
oauth_token_secret?: String | Null
oauth_token?: String | Null
}
Unknown arg state in data.state for type AccountUncheckedCreateInput. Did you mean type? Available args:
type AccountUncheckedCreateInput {
id?: String
userId: String
session_state?: String | Null
oauth_token_secret?: String | Null
oauth_token?: String | Null
}

The reason this happens isn't any thing crazy-- the object that comes back from slack has two additional properties or so it appears. "ok" and "state".
When linkAccount runs (which is a really basic method that doesn't remap any fields) it's got fields that prisma isn't expecting on the base schema.

linkAccount: (data) => p.account.create({ data }),

Your question/bug report 📓

See reproduction above.

Contributing 🙌🏽

No, I'm afraid I cannot help regarding this

Metadata

Metadata

Assignees

No one assigned

    Labels

    adaptersChanges related to the core code concerning database adaptersprisma@auth/prisma-adapterstaleDid not receive any activity for 60 days

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions