updateSession method
Update OAuth Session (Refresh Tokens)
Access tokens have limited lifespan and expire to mitigate security risks. If session was created using an OAuth provider, this route can be used to "refresh" the access token.
Implementation
Future<models.Session> updateSession({required String sessionId}) async {
final String path =
'/account/sessions/{sessionId}'.replaceAll('{sessionId}', sessionId);
final Map<String, dynamic> params = {};
final Map<String, String> headers = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.patch,
path: path, params: params, headers: headers);
return models.Session.fromMap(res.data);
}