
the same way the sdk does it just for testing but i did it actually i am using the sdk for the oauth

The way it works for the SDK is the user is redirected back to an oauth2 success page where the secret for the cookie is in the url. Then, the user is redirected into the app where the app can pull the secret out from the url and save it.
So, instead, you can redirect to your own deep link and then pull out the value yourself. You just need to redirect to /auth/oauth2/success

provider: 'google',success: "https://appwrite.hordevfree.online/v1/auth/oauth2/success"
);```

Thank you, correct, I had read something about it but the truth is that I cannot understand very well how to do it. Should I just put the url? or I also need to create some content in that url

I suppose the url must have code that redirects to the app sending this cookie, am I okay?

Look into deep linking

The url should link into the app

Thanks, it worked for me using deep links. Although it is not a pleasant way for the user because the screen flashes at the end of the login since a new instance of the application is created instead of just closing the browser.

what do you mean? what flash?


To this black screen, which is because it only works for me on android:launchMode="standard"

Of course this no longer has to do with appwrite, but hey I'm fighting to make it look good. According to what I read, it is solved with the onNewIntent() method, but I still haven't succeeded

I see...I think we typically do android:launchMode="singleTop"
. Can you do that?

Correct, but it doesn't work for me android:launchMode="singleTop"
, it keeps loading the google account selection page and doesn't return to the application. I'll keep trying anyway 👍

Are you still calling this?

final data = await account.createOAuth2Session(
provider: 'google',
success: "https://hordevfree.online/auth/oauth2/success");

I had to use another page because appwrite. the assetlinks.json did not work

I wonder if you need to use something else other than our SDK 🧐

😅 Well, I needed cloud but without the offline mode it doesn't work for me.

i mean maybe you can just open the browser

ooh good but I don't think that generates the problem. Or maybe because when I give the account I want to log in with twice android:launchMode="singleTop" it works

I'll try

Thanks for everything, I finally did it using the same code from the sdk; with the FlutterWebAuth2
package you save a lot of work because I don't try it before 😅

Ah right I guess that's an option

[SOLVED] How get cookie of oauth google session
Recommended threads
- Still an issue? On user deletion, target...
This has been mentioned here: https://discord.com/channels/564160730845151244/1295830646039515146 and as a Github issue here: https://github.com/appwrite/appwri...
- Appwrite database is rounding int values
Hi, i just noticed that appwrite is rounding the value 608542412536545279 to 608542412536545300 in my int array. It seems to somewhat relate to this github iss...
- OAuth fails with Invalid Response or inv...
Im currently trying to use the Discord Oauth but i cant find a way to make it work. I followed the docs and set up the discord oauth application and enabled it...
