Skip to content
Back

apple id can't login

  • 0
  • Flutter
  • Apple
u_peter
8 Jul, 2023, 02:50

So how do I locate it, is there a log that can be printed

TL;DR
User is experiencing issues logging into their Apple ID. There is an error message "TypeError: Cannot read properties of undefined (reading 'length')" when trying to log in. The user also mentions a blank screen when accessing the document page. No solution is provided in the thread, but a suggestion is made to create a separate post for assistance.
Drake
8 Jul, 2023, 03:19

not really. maybe you can follow this to see what to fill in where: https://dev.to/appwrite/apple-sign-in-with-appwrite-2576

u_peter
8 Jul, 2023, 03:47

Unfortunately, I configured it through this article

u_peter
8 Jul, 2023, 03:48

AppWrite has a logging system, in the client local, I see amplify, firebase their client SDK, all have local logging, so that I can analyze and trace

u_peter
8 Jul, 2023, 03:57

Additionally, I am able to use GitHub authorization, but why am I unable to retrieve the avatar of GitHub users? I have already included the necessary permissions in the scopes parameter.

u_peter
8 Jul, 2023, 03:57

@override Future<Either<Failure, dynamic>> loginByGithub() async { try { final session = await _account.createOAuth2Session( provider: 'github', scopes: ["read:user", "user:email"]); // final user = await _authAPI.currentUserAccount(); // print('xxx user ' + user!.toMap().toString()); // Why, I can't get the user profile picture? return right(session); } on AppwriteException catch (e, stackTrack) { return left(Failure(e.message ?? "error", stackTrack)); } catch (e, stackTrack) { return left(Failure(e.toString(), stackTrack)); } }

u_peter
8 Jul, 2023, 03:58

In the result of account.get(), why there is no avatar information.

u_peter
8 Jul, 2023, 03:58

account data : {$id: 64a80eb8da428e856ee0, $createdAt: 2023-07-07T13:10:17.216+00:00, $updatedAt: 2023-07-08T03:53:52.156+00:00, name: LiuYipeng, password: null, hash: null, hashOptions: null, registration: 2023-07-07T13:10:17.214+00:00, status: true, passwordUpdate: , email: &#x31;&#x36;&#49;&#x31;&#x36;&#x34;&#x31;&#48;&#51;&#x37;&#64;&#x71;&#113;&#x2e;&#x63;&#111;&#109;, phone: , emailVerification: true, phoneVerification: false, prefs: {data: {}}}

Dakshie
8 Jul, 2023, 04:37

You won't get the avatar url in account.get()

Instead do this,

  1. account.getSession("current")
  2. it will return a session object, from there get the providerAccessToken
  3. You would need to pass this token to the GitHub API, something like:
TypeScript
fetch("https://api.github.com/user", {
              headers: {
                Authorization: `Bearer ${providerAccessToken}`,
              },
            })```
4. And get the avatar_url from the response returned
u_peter
8 Jul, 2023, 05:46

Thank you especially for your reply, I will try it now, but the authorization document of AppWrite is too indetailed, and there is no detailed document

Dakshie
8 Jul, 2023, 06:13

Docs will be new and improved soon 🙂

u_peter
8 Jul, 2023, 06:13

why without twitter auth provider in appwrite ?

u_peter
8 Jul, 2023, 06:17

I just tried it, you can get the avatar through the github api, I have a question, since you can call the github api through providerAccessToken to get information, why not help us wrap it inside appwrite? Does each different user provider need us to use their own platform's API, I think we can uniformly hand over to AppWrite to encapsulate information @Dakshie

u_peter
8 Jul, 2023, 07:02

I just tried it, you can get the avatar through the github api, I have a question, since you can call the github api through providerAccessToken to get information, why not help us wrap it inside appwrite? Does each different user provider need us to use their own platform's API, I think we can uniformly hand over to AppWrite to encapsulate information @Dakshie

Dakshie
8 Jul, 2023, 07:06

So you are saying, having a function like account.getInfo() and it makes the call to the API for us and get the info? Yeah that would be cool That's where appwrite functions can come into play 🙂

Dakshie
8 Jul, 2023, 07:12

Or maybe you can create an issue for that. Let someone else from the team guide you further )

u_peter
8 Jul, 2023, 07:32

yes ,you are right

u_peter
8 Jul, 2023, 08:21
u_peter
8 Jul, 2023, 08:22

I go to the docoment page and the screen is blank and nothing is displayed?

u_peter
8 Jul, 2023, 08:22

attributeForm-08a75dae.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length') at Array.lt (attributeForm-08a75dae.js:1:15662) at fe (attributeForm-08a75dae.js:1:21263) at ne (attributeForm-08a75dae.js:1:14375) at st (attributeForm-08a75dae.js:1:23239) at Je (index-110ed6ed.js:4:6338) at new Dt (attributeForm-08a75dae.js:1:24323) at Array.Pe (_page.svelte-df2a39bc.js:1:3122) at Xt (index-110ed6ed.js:1:793) at Array.W (cardGrid-f5da4ed1.js:1:965) at Xt (index-110ed6ed.js:1:793)

u_peter
8 Jul, 2023, 08:22

@Dakshie

Drake
8 Jul, 2023, 16:57

Please create a separate <#1072905050399191082> post since this is a different topic

Drake
12 Jul, 2023, 15:38

Did you get apple sign in working?

Drake
12 Jul, 2023, 15:39
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