createEmailSession method
Create Email Session
Allow the user to login into their account by providing a valid email and password combination. This route will create a new session for the user.
A user is limited to 10 active sessions at a time by default. Learn more about session limits.
Implementation
Future<models.Session> createEmailSession(
{required String email, required String password}) async {
const String path = '/account/sessions/email';
final Map<String, dynamic> params = {
'email': email,
'password': password,
};
final Map<String, String> headers = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: path, params: params, headers: headers);
return models.Session.fromMap(res.data);
}