Hello, i'm new with appwrite and trying some functions with it. First i wanna create a way to register user or using OAuth2 for Google. What ever I do, it doesnt work https://prnt.sc/QdiFbDAAb-sO this is just a small script taking input from form and send it with account.create for creating user. getting 500 https://prnt.sc/Ier6aEpn9jnN Next I create just a button with selfwritten values for creating, same 500 error the last way i was trying was to create a google Session with OAuth2 https://prnt.sc/8AjhgMAmfP72 click on button, asked which account i will use, if i'm sure i wanna log in and at the end i get redirected into my failure page I was double checking if the redirect-uri from appwrite was right and client id + client secret was copied properly. I'm really not sure what I do wrong. If you need more infos just tell me what.
For the create account, you're passing an empty string for the user id which isn't allowed.
For the oauth problem, is there anything else in the URL on the failure page?
i was thinking when i send a blank for id it would be created automaticlly, because with ID.unique() i just get the string "unique()", and just to send email and password doesnt work because it needs 3 parameters right?
http://localhost:3000/failure?error=%7B%22message%22%3A%22Failed+to+obtain+access+token.+The+Google+OAuth2+provider+returned+an+error%3A+invalid_client%3A+Unauthorized%22%2C%22type%22%3A%22user_oauth2_unauthorized%22%2C%22code%22%3A401%7D if i read it right, my secret or id are wrong. I used this https://prnt.sc/T34gUksQUGAZ Client ID as App ID and secret as App Secret for appwrite
No you can't pass an empty string
You created a web app oauth client?
Maybe there's extra space or something
yes i did, was a fresh one
oh, after multiple times I copied the secret it was always a space as first character and i was never checking by clicking on the eye....
great, just 2 errors left... when i cant send a blank id and ID.unique() gives me the string "unique()" what should i try? maybe user api instead of account api? (hasnt checked user api actually)
Pass ID.unique()
like the docs suggest
not sure what I did wrong the last 6 hours after trying to use ID.unique() but it passed now...
Glad it's working! However, we really shouldn't be responding with 500 due to empty string for the id. Would you be able to create a GitHub issue for that so we can improve the error handling?
Recommended threads
- My account is blocked so please check an...
My account is blocked so please unblock my account because all the apps are closed due to which it is causing a lot of problems
- Applying free credits on Github Student ...
So this post is kind of related to my old post where i was charged 15usd by mistake. This happens when you are trying to apply free credits you got from somewh...
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...