nhost / nhost-dart

Nhost Dart & Flutter packages

Home Page:https://nhost.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server Error on Authentication

rajnish93 opened this issue · comments

image
I am getting above error on signin.
I am using nhost_sdk: ^3.0.0.

You cannot use subdomain URLs with the older SDK versions; it's now supported in the new version, but it's not stable yet; however, it's a release candidate that we may release it very soon.

Check this out nhost_sdk: ^4.0.0-dev.7 or this link

If you install version 4.0.0-dev.6 you should do this instead

final client = NhostClient(subdomain: 'qtytsmqhoundvrsxxznl', region: 'ap-south-1');

Alternatively, in version 3.0.0 that you are using, you can change backendURL to

backendUrl: https://qtytsmqhoundvrsxxznl.nhost.app

This should work.

how do I modify default signIn and singOut url this case as it is taking default one @mhadaily

I am not sure what you mean SignIn, SignOut Url, do you mean the endpoint for Nhost? if so, you are not supposed to change that, the endpoint is handled in the SDK. if I misunderstood, please elaborate more. I am happy to help.

yes SDK endpoints with custom endpoints @mhadaily Is there other package in flutter to handle authentication and authorization apart from firebase_auth as Nhost does not allow to modify endpoints

I need some help here. What Nhost_auth is doing here is very similar to firebase_auth in fact. If you call signInWithPassword method in Nhost_SDK you are not supposed to change the endpoint API! That will be handled by the SDK. however, you can change subdomain and region which you can get from Nhost dashboard for your project. and that makes the baseURL for your endpoint.

You can have federated authentication such as Google or Facebook or etc too in Nhost and Dart SDK support that now.

if you still are missing anything here, can you please give me an example on what you want to achieve that you cannot at the moment?