Code Monkey home page Code Monkey logo

Comments (8)

mhadaily avatar mhadaily commented on May 30, 2024 1

Hi,
I have updated all examples ready on this PR #95

We are activity working to improve the SDK. stay tuned.

from nhost-dart.

mhadaily avatar mhadaily commented on May 30, 2024 1

Yes, I am working on it. I think we will make it in the next major release two.

from nhost-dart.

diegonc avatar diegonc commented on May 30, 2024

There also seems to be a mismatch between the expected query parameter name (refresh_token) and the actual parameter name used by NHost callback (refreshToken)

image

EDIT: here is a workaround for now

if (uri.queryParameters.containsKey('refreshToken')) {
  Map<String, String> params = {};
  params.addAll(uri.queryParameters);
  params['refresh_token'] = uri.queryParameters['refreshToken']!;
  client.auth
    .completeOAuthProviderSignIn(uri.replace(queryParameters: params));
} else {
  client.auth.completeOAuthProviderSignIn(uri);
}

from nhost-dart.

diegonc avatar diegonc commented on May 30, 2024

Hi, thank you very much for your work!

Will this improvements include the migration from the old backend URL discussed in the link below?

nhost/nhost#1319

from nhost-dart.

mhadaily avatar mhadaily commented on May 30, 2024

@diegonc Check this out nhost_sdk: ^4.0.0-dev.8 or this link for supporting subdomain and region.

from nhost-dart.

totzk9 avatar totzk9 commented on May 30, 2024

Unfortunately, using launchUrl with Facebook would block me from authenticating because of Embedded browser security check from Facebook.

Found a workaround to authenticate with OAuth in Flutter though.

  1. Use this package https://pub.dev/packages/oauth_webauth specifically the BaseWebView widget
  2. add initialUrl with '${createNhostServiceEndpoint(subdomain: YOUR_SUBDOMAIN, region: YOUR_REGION, service: 'auth')}/signin/provider/facebook'
  3. add redirectUrls with your callback URL (https://xxxxxx.auth.YOUR_REGION.nhost.run/v1/signin/provider/facebook/callback)

After successful auth, should return with the callback?code=

from nhost-dart.

spakanati avatar spakanati commented on May 30, 2024

The example now has updated URLs but still doesn't work because it refers to success/failure callback settings, which do not seem to be supported. Is there an updated suggestion for how to implement?

from nhost-dart.

dbarrosop avatar dbarrosop commented on May 30, 2024

because it refers to success/failure callback settings

that part is incorrect, there is no success/failure URLs in hasura-auth, instead, if there is an error, the callback url will include an error query arg describing the issue

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.