I am unable to implement login signup functionality when the data is sent to the backend it doesn't return the currentUser.I am attaching the bug and the code of the Auth file for reference. It would be of great help if somebody could look into it and find the error. @Dennis Ivy
Summary
Developers are experiencing an issue with the guest user role missing scope(account). They are unable to implement login/signup functionality properly as the data sent to the backend does not return the currentUser. They suspect the problem is with the createAccount function and getCurrentUser method. The error being encountered is an appwrite exception of invalid URL. One suggestion is to check the code formatting for better readability.
Kenny
Jul 1, 2024, 13:15
What is not working? Login? Signup?
Kenny
Jul 1, 2024, 13:15
Also you should look into code formatting, having everything left aligned like that makes it far harder to read than if you have it indented and formatted correctly.
chiranjeev
Rank 1: Thread
Jul 1, 2024, 13:23
whenever the getCurrentUser() method on the signup page is called it gives an appwrite exception of invalid URL
Kenny
Jul 1, 2024, 13:25
Do you have that error/stack trace, you could post?
chiranjeev
Rank 1: Thread
Jul 1, 2024, 13:26
yes sure
chiranjeev
Rank 1: Thread
Jul 1, 2024, 13:27
Kenny
Jul 1, 2024, 13:28
Neither of those say invalid URL
chiranjeev
Rank 1: Thread
Jul 1, 2024, 13:29
yes sir it is showing missing scope
chiranjeev
Rank 1: Thread
Jul 1, 2024, 13:30
I wrote invalid URL by mistake earlier
Kenny
Jul 1, 2024, 13:30
At what point are you called getCurrentUser?
chiranjeev
Rank 1: Thread
Jul 1, 2024, 13:31
while sending the signup data to the backend
Kenny
Jul 1, 2024, 13:40
What does userData on line 19 return?
chiranjeev
Rank 1: Thread
Jul 1, 2024, 13:51
sir I tried to console it but it is not returning anything. Ideally it should be returning an object with user's data
chiranjeev
Rank 1: Thread
Jul 1, 2024, 13:52
Kenny
Jul 1, 2024, 13:53
I think your issue is with the createAccount function. Can you log the output of userAccount on line 15 in auth.js, and log the error in the catch block of that same function
Kenny
Jul 1, 2024, 13:53
and post those
chiranjeev
Rank 1: Thread
Jul 1, 2024, 13:56
yes sir
Kenny
Jul 1, 2024, 14:00
I'm not seeing any outputs from either of those logs, is the singup function being called?