
Hi, I have a problem to login via google oAuth in my Flutter mobile app. What should return createOAuth2Session function? In my case, after login by google I get a screen with "missing redirect..." error just for second and then back to login page. Function returns null and session is not created. But in Appwrite console I see that account is created and verified.

right...it actually doesn't return the session, but the user should be authenticated based on the flow you describe π§

Are you able to call account.get()
right after?

yes, I call account.get() and have 401 error. Strange because in Appwrite panel I see that account is created and even session

what's your code? Are you using the same Client
instance across your codebase?

I've looked into this issue a bit more. And I know exactly when it occurs. In the first video, I log in to the account that is saved earlier in the browser. Log in works and logout does the same. In the second video, I log in to an account that is not saved in the browser. I enter the password and login succeeds. However, log out is not successful. It's strange because before( by account.get() ) method I check the previously created session and close the login page based on this. The session is also visible in Appwrite panel

Log in to account that is saved earlier? Appwrite sdk persists sessions so you shouldn't have to log in again π§

What's the code with the account.get() and logout?

And how are you initializing and using Client in your codebase?

No. I mean I saved before credential in browser only. Then I open my app. In 1st video everything is ok. I login only once and session is holded. Sesond video is after reinstallation app and delete credential from browser

Weird...that shouldn't affect the oauth flow...

I will send piece of code tommorow
Recommended threads
- Redirect URL sends HTTP instead of HTTPS...
I am not sure since when this issue is present, but my Google and Apple redirect URI are no longer pointing to the HTTPS redirect URI when I try to use OAuth. ...
- Failing to run document operations on sd...
Could someone point me in the right direction I'm going in cirlces. I have a problem with sdks and my self-hosted server in production (for ~3 years) I have bee...
- Functions fail to deploy after switching...
Hi <@1087889306208718959> , after switching my self-hosted Appwrite instance to use AWS S3 as the storage backend, my Cloud Functions stopped working. Iβm runni...
