Skip to content
Back

updateSession not working anymore

  • 0
  • 3
  • Android
  • Auth
  • Apple
  • Cloud
Zelimir
8 Dec, 2025, 18:19

Was something changed recently on Cloud since updateSession is no longer working and I get 400 when calling it, with following error:

TypeScript
{
    "message": "The chosen OAuth provider is unsupported. Please check the <a href=\"/docs/client/account?sdk=web-default#accountCreateOAuth2Session\">Create OAuth2 Session docs</a> for the complete list of supported OAuth providers.",
    "code": 400,
    "type": "project_provider_unsupported",
    "version": "1.8.0"
}

I am getting more and more of these errors since yesterday. Calling this from mobile apps for regular email/password session (passing "current" as param), so OAuth has nothing to do with it.

TL;DR
The user is encountering an issue with the updateSession function while working with email/password login. They are receiving a 400 OAuth error despite not using OAuth. The code snippet provided shows the implementation in Kotlin. The problem seems to be occurring across iOS and Android apps as well as web SDK.
AdrianCole
8 Dec, 2025, 18:22

Hi

AdrianCole
8 Dec, 2025, 18:22

Given your situation (mobile apps, email/password sessions, updateSession('current') calls), the safest and most future-proof approach is: Stop using updateSession() for email/password sessions — it’s not designed for that and appears broken in Cloud v1.8.0. Use full login flow (re-create session) when needed instead of “refreshing.” Treat session expiration as a hard limit, unless you implement your own “sliding session” mechanism server-side. Monitor Appwrite’s GitHub / changelog to see if they restore support or document a new proper way to refresh sessions.

AdrianCole
8 Dec, 2025, 18:25

So from all this: updateSession() is not guaranteed to work (or even intended to work) for email/password sessions. Its behavior is tightly coupled to OAuth sessions (provider-based refresh), and even then there are known reliability issues. Thus the “project_provider_unsupported” error suggests that the Cloud backend misinterprets your session as OAuth-based — and when it tries to “refresh” using OAuth logic, it fails because the “provider” for that session is not a valid (or configured/enabled) OAuth provider.

AdrianCole
8 Dec, 2025, 18:25

Rely on re-login or session recreation instead of refresh. When the session expires or is about to expire, prompt the user to log in again (or silently reauthenticate) to get a fresh session. This is more “manual” but matches the supported flow.

8 Dec, 2025, 21:31

Thanks ChatGPT 🤨

8 Dec, 2025, 21:38

what?

9 Dec, 2025, 07:14

Sounds exactly like chatgpt and co generated answer with a workaround which I don't really need

9 Dec, 2025, 09:01

What's the code? And what's the OAuth provider that you're using?

9 Dec, 2025, 09:05

I am not using OAuth at all, that is what is wrong here. This is for regular email/password login so calling updateSession should just extend session length as per the docs. This worked few days ago, and now I get 400 OAuth error without any changes on my side.

22 Dec, 2025, 10:42

Any update on this? This is still not working and was never fixed!!!

22 Dec, 2025, 14:30

What's your code?

22 Dec, 2025, 14:30

What's the SDK version that you're using?

23 Dec, 2025, 09:27

What do you mean by code, which code?

23 Dec, 2025, 09:28

I am on the latest SDKs on both iOS (13.5.0) and Android (11.4.0)

24 Dec, 2025, 00:14

I mean the Swift or Kotlin code fragment that isn't working as expected

24 Dec, 2025, 15:24

To simplify, it is just this

TypeScript
// init client
val client = Client(

    context = app,
    endpoint = appConfig.endpoint,
    selfSigned = false
)
    .setProject(appConfig.projectId)
val account = Account(client)

...
// create account or login with email/password
account.create(...)
account.createEmailPasswordSession(...)
...

// fetch current session
val sessions = account.getSession(sessionId = "current")

// session is valid, check expiration

// and this fails always
account.updateSession(sessionId = "current")

Init client, create email/password user and session and call updateSession. I don't actually call updateSession right after login, that is just an example. I call it after some time, before session expires.

The point is that API throws some OAuth errors but I am not using OAuth, this is email/password session. And this worked fine before, it stopped working on Cloud without any changes on my side.

13 Mar, 2026, 19:56

This is still not working, can someone please check. It is broken across different apps, both iOS and Android, and also I see reports here for web sdk.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more