Code Monkey home page Code Monkey logo

Comments (7)

subhendukundu avatar subhendukundu commented on May 29, 2024 1

Well I had been playing around with nhost-dart for a while now. Few observations.

  1. Using app_links for the login, very smart move but I haven't able to make it work with.
  2. Docs we need to work on.

So this is what I did.

  1. I have used flutter_web_auth.
    Setting the callback urls to 'io.higgle.dakuapp://login-callback
Future googleSignIn() async {
    try {
      final result = await FlutterWebAuth.authenticate(
        url: nhostGoogleLoginUrl,
        callbackUrlScheme: 'io.higgle.dakuapp://login-callback',
      );
      nhostClient.auth.completeOAuthProviderLogin(Uri.parse(result));
      return true;
    } catch (e) {
      print(e);
      return false;
    }
  }

And this works. But what about the web support? https://daku.app has web support. Any idea?

from nhost-dart.

shyndman avatar shyndman commented on May 29, 2024

There is an example here for logging in via GitHub. The other providers should be similar.

Does that help?

from nhost-dart.

subhendukundu avatar subhendukundu commented on May 29, 2024

It does definitely help. But I think it's just easier for developers, easy with sample code. Sometimes they can just stuck with small things. Plus I think we should just focus on "making product as easy as possible". So they can just focus on product. We can take care of the rest. Just a thought, you don't have to take this too seriously. 🙂

PS: I can help.

from nhost-dart.

shyndman avatar shyndman commented on May 29, 2024

No, it's a great suggestion, and I agree the process should be easier.

One of the tricky parts about the social logins is that you need to tweak the configuration of the native app so that it recognizes a custom app URI (which calls back into the app from the browser). So it's not quite as copy-pasteable as other examples, even if all the Dart code is right in front of you. Then there's also the backend config, and having to set that up properly.

Maybe the ideal would be to add some capability to nhost_flutter_auth, or a new package (one that includes the necessary plugins)? An API where you could say nhost.auth.loginWithGitHub(), and have it return a Future that resolves just like any other login call.

It could even check your configuration (native app, and backend). Complain if it finds problems. Link you to resources that might help.

What do you think?

from nhost-dart.

subhendukundu avatar subhendukundu commented on May 29, 2024

So We can keep 2 packages. One is the core. Few devs might not want to add these but we will still add these dependencies, which is not good I think.
The other package/packages, which will have all the native, and devs just plug it in and use it. Might be okay adding easy config in native if really needed to.

@elitan and I keen to make developer experiences as easy we can. Just like no-code but legos.

from nhost-dart.

shyndman avatar shyndman commented on May 29, 2024

@elitan and I keen to make developer experiences as easy we can. Just like no-code but legos.

Makes sense. I think we can get something like that going.

from nhost-dart.

shyndman avatar shyndman commented on May 29, 2024

Sorry, to be clear, that seems like a good goal, and is certainly possible. Whether to pursue is not my call.

from nhost-dart.

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.