
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
- 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...
