Comments (7)
Well I had been playing around with nhost-dart for a while now. Few observations.
- Using app_links for the login, very smart move but I haven't able to make it work with.
- Docs we need to work on.
So this is what I did.
- 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.
There is an example here for logging in via GitHub. The other providers should be similar.
Does that help?
from nhost-dart.
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.
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.
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.
@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.
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)
- How to save login status? When I log in and restart the application, the login status disappears HOT 3
- localhost (10.0.2.2) not working for Android emulators HOT 2
- Bump dependencies versions
- Dart client should accept/prefer "local" as subdomain for local-cli development now that localhost is deprecated HOT 8
- auth url incorrect HOT 2
- http can not be updated because of the 'betamax' package HOT 6
- OAuth redirect URI mismatch HOT 7
- Fix CI
- Upgrading to Dart 3 and Flutter 3.10 HOT 1
- Nhost gql link uses websocketlink incorrectly for queries that appear in a document that also has subscriptions
- [nhost_graphql_adapter] bump http ^0.13.5 dependency HOT 1
- No clear way to provide the admin-token HOT 1
- remove backendUrl
- New Flutter 3.16.0 includes Dart 3.2.0 and nhost_dart is not compatible HOT 1
- How to choose user role when doing a request? HOT 2
- nhost_dart 2.0 and nhost_graphql_adapter 4.0 are not compatible HOT 2
- dependencies issue HOT 5
- How to use Hasura GQL subscription query? HOT 1
- Run gql query from flutter tests without mocking
- storage function uploadBytes requires "name", but the column is nullable HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nhost-dart.