Skip to content
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

Issue with 'name' field #1123

Closed
yelch opened this issue May 23, 2024 · 0 comments · Fixed by #1197
Closed

Issue with 'name' field #1123

yelch opened this issue May 23, 2024 · 0 comments · Fixed by #1197

Comments

@yelch
Copy link

yelch commented May 23, 2024

Path: /self-hosting/single-sign-on

I try to use OIDC via Synology. Synology only supports the following claims:
"claims_supported" : [ "aud", "email", "exp", "groups", "iat", "iss", "sub", "username" ]
--> 'name' is missing

I can authenticate, but rallly stops with a "error=OAuthCreateAccount"
Log says

[next-auth][error][adapter_error_createUser] 
https://next-auth.js.org/errors#adapter_error_createuser 
Invalid `prisma.user.create()` invocation:
{
�
{
    email: "user@mydomain",
    emailVerified: null,
+   name: String
  }
}
Argument `name` is missing. {
  message: '\n' +
    'Invalid `prisma.user.create()` invocation:\n' +
    '\n' +
    '{\n' +
    '  data: {\n' +
    '    email: "user@domain",\n' +
    '    emailVerified: null,\n' +
    '+   name: String\n' +
    '  }\n' +
    '}\n' +
    '\n' +
    'Argument `name` is missing.',
  stack: 'PrismaClientValidationError: \n' +
    'Invalid `prisma.user.create()` invocation:\n' +
    '\n' +
    '{\n' +
    '  data: {\n' +
    '    email: "user@domain",\n' +
    '    emailVerified: null,\n' +
    '+   name: String\n' +
    '  }\n' +
    '}\n' +
    '\n' +
    'Argument `name` is missing.\n' +
    '    at yn (/app/node_modules/@prisma/client/runtime/library.js:116:5852)\n' +
    '    at wn.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:123:6429)\n' +
    '    at wn.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:123:6119)\n' +
    '    at wn.request (/app/node_modules/@prisma/client/runtime/library.js:123:5839)\n' +
    '    at async l (/app/node_modules/@prisma/client/runtime/library.js:128:9763)',
  name: 'PrismaClientValidationError'
}

Could you eighter add a env-string like 'OIDC_USER_CLAIM' or in that case just use email as name if name is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant