Giter Club home page Giter Club logo

Comments (7)

mkozhukharenko avatar mkozhukharenko commented on May 27, 2024 1

and replace it with your own implementation

sorry, I didn't understand that you are talking about replacing email-auth with own implementation. I thought you meant extending it.

now everything is clear.

from graphcool-templates.

marktani avatar marktani commented on May 27, 2024

That's correct - all custom authentication examples in this repository assume that no authentication provider is enabled in your project. You should be able to migrate the current email-password auth to something similar to this example.

from graphcool-templates.

mkozhukharenko avatar mkozhukharenko commented on May 27, 2024

consider next scenario:

  1. the email-pass auth provide is enabled
  2. accoukKit phone auth is set up
  3. user don't have an account (neight email-pass, nor accountKit using phone)
  4. user trying to login using accountKit phone auth

but we can't sign him up since using only his phone since his email is required!

from graphcool-templates.

marktani avatar marktani commented on May 27, 2024

the email-pass auth provide is enabled

you can replace and even cover more advanced scenarios with something similar to this using Schema Extensions. Then you can include the logic that handles the sync between account kit and email sign ups in your functions, too. 🙂

from graphcool-templates.

mkozhukharenko avatar mkozhukharenko commented on May 27, 2024

If user NEVER signed to my app before and is trying to sign using his phone number only -> I can't sign him in since EMAIL is REQUIRED by backend.

please, try to understand the situation. It's a problem.

from graphcool-templates.

marktani avatar marktani commented on May 27, 2024

Hey @mkozhukharenko I understand the situation, and it's caused by the limited possibilities of the email-pass provider. The reason the email field is required, is because the email-pass provider is enabled. That's why I wrote

all custom authentication examples in this repository assume that no authentication provider is enabled in your project.

Now, if you disable the email-pass provider, and replace it with your own implementation, the email field doesn't have to be required anymore, because that's all in your control now.

Of course, if you actually WANT the email field to be required, you'd need to adjust the sign up flow using account kit to also include an email address.

I agree that this is a problem, and I am trying to show you potential approaches to tackle it 🙂 Do you understand my suggestion now? I wasn't as clear before, sorry!

from graphcool-templates.

marktani avatar marktani commented on May 27, 2024

Great, thanks again for bringing up this confusion! I'll close this issue 🙂

from graphcool-templates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.