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

Cannot login with password less in version 3.3.2 #2629

Open
ahmedabdelhafez opened this issue Apr 2, 2024 · 7 comments
Open

Cannot login with password less in version 3.3.2 #2629

ahmedabdelhafez opened this issue Apr 2, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@ahmedabdelhafez
Copy link

Hello dears,
i create a small login component to test the passwordless and i am using version 3.3.2 as mentioned in te title and after i add email anad click sign in this is the response

{ "status": 500, "message": "{\"message\":\"field 'roles' not found in type: 'users': {\\\"response\\\":{\\\"errors\\\":[{\\\"message\\\":\\\"field 'roles' not found in type: 'users'\\\",\\\"extensions\\\":{\\\"path\\\":\\\"$.selectionSet.users.selectionSet.roles\\\",\\\"code\\\":\\\"validation-failed\\\"}}],\\\"status\\\":200,\\\"headers\\\":{}},\\\"request\\\":{\\\"query\\\":\\\"query users($where: users_bool_exp!) {\\\\n users(where: $where) {\\\\n ...userFields\\\\n }\\\\n}\\\\n\\\\nfragment userFields on users {\\\\n id\\\\n createdAt\\\\n disabled\\\\n displayName\\\\n avatarUrl\\\\n email\\\\n passwordHash\\\\n emailVerified\\\\n phoneNumber\\\\n phoneNumberVerified\\\\n defaultRole\\\\n isAnonymous\\\\n ticket\\\\n otpHash\\\\n totpSecret\\\\n activeMfaType\\\\n newEmail\\\\n locale\\\\n metadata\\\\n roles {\\\\n role\\\\n }\\\\n}\\\",\\\"variables\\\":{\\\"where\\\":{\\\"email\\\":{\\\"_eq\\\":\\\"[email protected]\\\"}}}}}\",\"stack\":\"Error: field 'roles' not found in type: 'users': {\\\"response\\\":{\\\"errors\\\":[{\\\"message\\\":\\\"field 'roles' not found in type: 'users'\\\",\\\"extensions\\\":{\\\"path\\\":\\\"$.selectionSet.users.selectionSet.roles\\\",\\\"code\\\":\\\"validation-failed\\\"}}],\\\"status\\\":200,\\\"headers\\\":{}},\\\"request\\\":{\\\"query\\\":\\\"query users($where: users_bool_exp!) {\\\\n users(where: $where) {\\\\n ...userFields\\\\n }\\\\n}\\\\n\\\\nfragment userFields on users {\\\\n id\\\\n createdAt\\\\n disabled\\\\n displayName\\\\n avatarUrl\\\\n email\\\\n passwordHash\\\\n emailVerified\\\\n phoneNumber\\\\n phoneNumberVerified\\\\n defaultRole\\\\n isAnonymous\\\\n ticket\\\\n otpHash\\\\n totpSecret\\\\n activeMfaType\\\\n newEmail\\\\n locale\\\\n metadata\\\\n roles {\\\\n role\\\\n }\\\\n}\\\",\\\"variables\\\":{\\\"where\\\":{\\\"email\\\":{\\\"_eq\\\":\\\"[email protected]\\\"}}}}}\\n at /app/node_modules/.pnpm/[email protected][email protected]/node_modules/graphql-request/dist/index.js:340:31\\n at step (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/graphql-request/dist/index.js:63:23)\\n at Object.next (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/graphql-request/dist/index.js:44:53)\\n at fulfilled (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/graphql-request/dist/index.js:35:58)\\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\"}", "error": "internal-error" }

and here is the my component code:
image

@ahmedabdelhafez ahmedabdelhafez added the bug Something isn't working label Apr 2, 2024
@dbarrosop
Copy link
Contributor

This looks like an issue somwhere else. Can you try the following graphql query in the console?

{
  users(limit: 1) {
    roles {
      __typename
    }
  }
}

@ahmedabdelhafez
Copy link
Author

@dbarrosop still the same issue

@dbarrosop
Copy link
Contributor

If that query doesn't work it means there is something wrong in your project. Are you self-hosting, using the CLI or are you using a project in our cloud?

@ahmedabdelhafez
Copy link
Author

@dbarrosop the command working and return this issue in console it's status is 200 but here is screenshot:

image

@dbarrosop
Copy link
Contributor

Yes, that means your project is broken as it's missing tables and/or relationships that should be there. Are you self-hosting, using the CLI or are you using a project in our cloud? Did you modify anything in the auth schema? Have you changed auth's metadata somehow?

@ahmedabdelhafez
Copy link
Author

ahmedabdelhafez commented Apr 3, 2024

i don't do any thing just copy the code from docs to create an example, andi just wake up the app it's created 3 weeks ago and i also update the package to versin 3.3.2 thats all

can you give me instructions to make it work, or should i delete it and start a new one to not waste time, thanks ..

@dbarrosop
Copy link
Contributor

If you can I'd suggest starting over, your project seems to be in a strange state and a clean start is certainly going to be the faster path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants