Skip to content
Back

updateSession not working anymore

  • 0
  • 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 updateSession() method is not reliable for email/password sessions, primarily intended for OAuth sessions. - The "project_provider_unsupported" error suggests a misinterpretation of the session as OAuth-based in the Cloud backend. - To address this, refrain from using updateSession() for email/password sessions. - Instead, opt for a full login flow when needed and treat session expiration as a hard limit. - Keep an eye on Appwrite’s GitHub/changelog for potential updates or a revised approach to refreshing sessions.
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.

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