-
Notifications
You must be signed in to change notification settings - Fork 148
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
💭 Description
I'll paste the source and you will notice the error:
/// Delete Session
///
/// Use this endpoint to log out the currently logged in user from all their
/// account sessions across all of their different devices. When using the
/// Session ID argument, only the unique session ID provided is deleted.
///
///
Future deleteSession({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.delete,
path: path, params: params, headers: headers);
return res.data;
}
/// Delete Sessions
///
/// Delete all sessions from the user account and remove any sessions cookies
/// from the end client.
///
Future deleteSessions() async {
const String path = '/account/sessions';
final Map<String, dynamic> params = {};
final Map<String, String> headers = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: path, params: params, headers: headers);
return res.data;
}- The param
sessionIdis required, so it will be only one session expired. - I don't see that passing 'current' as sessionId will expire the current session, would be nice since in the method getSession() works like that.
- Seems like the function that does log out the currently logged in user from all their account sessions across all of their different devices is the
deleteSessions. - Does it really remove any sessions cookies?
Proposed
Remove the method deleteSessions, and make the sessionId parameter optional. Change the description so it includes 'current' if it really works like that.
If you tell me how to act I can provide the PR
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation