The same works fine for both Web and iOS but fails on Android with the following error:
[Error] Method: GET
[Error] URL: /v1/account
[Error] Type: Appwrite\Extend\Exception
[Error] Message: User (role: guests) missing scope (account)
I have configured the callback url in AndroidManifest.xml. Added a platform for the android.
Looks like the cookies are not being sent. The request object seems to contain all the cookies, but the request instance in the incoming response object doesn't have them. Am I missing something w.r.t configuration?
Summary
I had an issue with Google oauth succeeding but failing to retrieve the account with a 401 response error. It turns out the problem was that I had configured the wrong scheme (`http` instead of `https`) for the client endpoint. The same process works fine for Web and iOS, but not for Android. The error message indicated that the user was missing the scope (account). I have already configured the callback URL in my AndroidManifest.xml and added a platform for Android. It seems that the cookies are not being sent properly. The request object shows that all the cookies are there, but the incoming response object does not have them. I
Drake
Admin
Aug 23, 2023, 20:10
How many instances of client do you have in your app?
bugs_cena
Rank 1: Thread
Aug 24, 2023, 18:02
I realized that this was an issue with wrongly configured scheme http vs https for client endpoint.
Drake
Admin
Aug 24, 2023, 18:36
[SOLVED] Google oauth succeeds, but fails to retrieve account - 401 response