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
- dynamic key missing scopes for database ...
Here are the scopes listed, I get permission errors for reading row and document. Appears to be missing since last time i checked. Database 6 Scopes policies....
- No server error on selfhosted appwrite
Please help me, my clients is ask what happen on their data? How can i make it up again?
- Upgrading selfhost version?
It is okay to upgrade version to higher one, of my current version is 1.7.4 to 1.8.1. Is that safe to do cause my clients already have data on that? Also is a...