Recently , me and @sanemi started working on flutter and we integrated appwrite for user login , We have code according to the appwrite sdk for dart/flutter and the code was fine and smooth while we complie, but when we are testing it is showing error code 403 ..... which means somme permissions are not there but we provided all the required deeds. We already setup flutter application integration in appwrite.
Summary
Summary: The user had an issue with a 403 response when using Flutter SDK with Appwrite. They discovered that they had missed adding the platform on the web and had not added the hostname. They added a wildcard in the hostname for development purposes and were able to make API calls successfully. The issue was related to CORS on Appwrite Cloud, which only allowed requests from localhost by default. They added Flutterflow domain in the Appwrite dashboard and had created a custom action integrating Appwrite and SDK. The 403 error occurred during the login process. The problematic block of code was found under the network tab in the error message. There was
Tessa
Oct 19, 2023, 17:37
@wess can you take a look at this?
D5
Moderator
Oct 19, 2023, 18:20
Could you please share the problematic part of the code where you're getting the error?
Tengo
Rank 2: Process
Oct 19, 2023, 18:21
@sanemi can you share network tab screen shot or curl request here??
sanemi
Oct 20, 2023, 05:37
sanemi
Oct 20, 2023, 05:38
and when i click to login button from which the action should be performed
sanemi
Oct 20, 2023, 05:39
sanemi
Oct 20, 2023, 05:41
As you can see the problematic block is under the network tab of error 403
D5
Moderator
Oct 20, 2023, 07:01
When clicking in the error it specifies what's happening?
sanemi
Oct 20, 2023, 07:36
It shows 403 error forbidden
D5
Moderator
Oct 20, 2023, 07:37
How are you performing the login?
D5
Moderator
Oct 20, 2023, 07:37
Also, is this cloud?
sanemi
Oct 20, 2023, 07:40
We created action in flutter flow cloud where we integrated appwrite and sdk and all that in custom action
sanemi
Oct 20, 2023, 07:41
yes this is cloud
sanemi
Oct 20, 2023, 08:04
D5
Moderator
Oct 20, 2023, 08:51
Did you have added flutterflow domain in your appwrite dashboard?
sanemi
Oct 20, 2023, 12:23
yes we did that
Tengo
Rank 2: Process
Oct 31, 2023, 08:22
Hi @D5 I found that there is some issue related to cors on appwrite cloud. It is not allowed other domains to make request than localhost..
Haimantika
Oct 31, 2023, 09:11
Did you added your domain to the list of allowed domains? Only localhost is allowed by default
Tengo
Rank 2: Process
Oct 31, 2023, 09:23
Earlier I was using flutter app on web so I was missed that platform adding in web and also hostname was not added that's why the issue was arrissed.. now I have added wildcard in hostname for development purpose so am able to make the api calls....
Tengo
Rank 2: Process
Oct 31, 2023, 09:23
Thank you everyone for the help
Haimantika
Oct 31, 2023, 09:25
Amazing! This means your issue is solved? 😄
Will go ahead and mark it as solved then 🙂
You can reopen this if there is still an issue