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

How i can create users a registration/login(next.js)? #2875

Closed
kaaboeld opened this issue May 2, 2020 · 4 comments
Closed

How i can create users a registration/login(next.js)? #2875

kaaboeld opened this issue May 2, 2020 · 4 comments

Comments

@kaaboeld
Copy link

kaaboeld commented May 2, 2020

Question about Keystone

  • Site users in a separate List(not Users)
  • User signup by email/password(field type Password)
  • User must be login to the site
  • User go to separate(not /admin) Login form
  • User fill email and password fields in the form
  • User try to submit a form(GraphQL query)
    ...
    Password type - Not read(by doc), I can't compare password from Form with an encrypted password in DB(I can't get a field with this Field type).
    How I can log in User to the Site?
@gautamsi
Copy link
Member

gautamsi commented May 3, 2020

Need to get list level authentication work.

#2017
AND
#2039

Are in that direction but seems stale for now.

@kaaboeld
Copy link
Author

kaaboeld commented May 4, 2020

@gautamsi thanks, can u add an example for use? I added authStrategies... but when I try request

query {
            allMembers(where: { email: "aaa", password: "bbb", isBanned: false } ){
                id email password isBanned 
            }
        }

I get response:
message: "Field "password" is not defined by type MemberWhereInput. Did you mean password_is_set?"

@gautamsi
Copy link
Member

gautamsi commented May 4, 2020

you want to look at how meetup-demo does that

@MadeByMike
Copy link
Contributor

@kaaboeld hope you got this working. The short answer is you can use keystone.executeQuery for small stuff, or a migration framework to initialise a database: https://github.com/keystonejs/keystone/discussions/299

We don't offer a complete solution for migrations yet but we have some demo projects with patterns you can copy.

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

No branches or pull requests

3 participants