Back

[SOLVED] Authentication

  • 0
  • Tools
  • Flutter
  • Self Hosted
  • Accounts
dammy
10 Mar, 2023, 20:46

I read the official docs of appwrite, watched videos and read articles so I could be able to implement AppWrite authentication, but I wasn't able to. All efforts were not giving desired outcome for creating user account. I've been on this for days and it's slowing my project down, cause there's need to implement authentication.

I'll be glad if someone can help be sending a beginner friendly analysis of the code functionality and the implementation in a sign up and login ui so I can be able to follow suite.

TL;DR
User is experiencing difficulties implementing AppWrite authentication in their project. They have tried following the official documentation, watching videos, and reading articles but have not been successful. They are looking for a beginner-friendly explanation of the code functionality and implementation for sign up and login UI. It is unclear where exactly they are stuck, but they have initialized the account and client, passed in their project ID and the provided URL. They tried triggering the account creation function with a TextField button but it didn't work. They also tried manually calling the function but had the same result. They did not check for any errors or network calls. It is suggested to check
Drake
10 Mar, 2023, 21:18

sooo where are exactly are you stuck? what was the last thing you tried?

dammy
10 Mar, 2023, 21:21

I initialized account and client and then pass in my project id and the url provided in the gitpod instance, I made sure it was running at that moment

then I passed a function that creates account to a TextField button for trigger, it didn't

I then did it manually by removing the function and placing it somewhere else but I made sure I called it and same thing

Drake
10 Mar, 2023, 21:26

did you see any network call execute? flutter has a network logger in the dev tools that's helpful for logging network requests

did any error occur?

dammy
10 Mar, 2023, 21:38

I didn't check

I just checked my appwrite dashboard to watch our if account was created

Drake
10 Mar, 2023, 21:38

any error in your app? maybe the request wasn't even being sent

dammy
10 Mar, 2023, 21:38

I didn't get app error

Drake
10 Mar, 2023, 21:39

nothing in the logs client side?

What's your code?

dammy
10 Mar, 2023, 21:40

which logs do you meant on flutter monitor or appwrite dashboard?

dammy
10 Mar, 2023, 21:40

Besides my laptop is off currently Expecting power supply

Drake
10 Mar, 2023, 21:40

flutter

dammy
10 Mar, 2023, 21:40

I just did according to the documentation for Flutter email account creation

dammy
10 Mar, 2023, 21:41

I didn't check there

But the app on my device didn't throw error either

Drake
10 Mar, 2023, 21:41

please share the next time you're working on your app

dammy
10 Mar, 2023, 21:42

No challenge, I will @Steven

I'm super grateful. I'm hoping to support appwrite when am able soon

dammy
10 Mar, 2023, 22:10

I did this lately @Steven

Drake
10 Mar, 2023, 22:16

this looks good so far (assuming endpoint and project are correct and your endpoint is a valid HTTPS or just HTTP)

dammy
10 Mar, 2023, 22:29

I created a file for endpoint and id

dammy
10 Mar, 2023, 22:29

I expected user account to be created, but non was

Drake
10 Mar, 2023, 22:29

because that doesn't actually create the account 👀

dammy
10 Mar, 2023, 22:30

ok, seems I left something behind

Drake
10 Mar, 2023, 22:31
TypeScript
// this creates an Account service that you can use to make API calls
Account account = Account(client);
Drake
10 Mar, 2023, 22:32

to create an account, you use the account service and call create:

TypeScript
final user = await account.create(
    userId: ID.unique(),
    email: 'me@appwrite.io',
    password: 'password',
    name: 'My Name'
);
dammy
10 Mar, 2023, 22:32

I did create account service here

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more