updatePhoneSession static method
Returns a map with the following keys: if there was no error:
session
:Session
from Appwrite if there was an error:error
:true
if there was an errortype
:error
if there was an errormessage
:String
containing the error messagecode
:int
containing the error code
Implementation
static Future<Map<String, dynamic>> updatePhoneSession({
/// UserId from the token map from createPhoneAccount
required String userId,
/// Password for the phone
required String secret,
}) async {
try {
final models.Session session = await _account.updatePhoneSession(
secret: secret,
userId: userId,
);
return session.toMap();
} on AppwriteException catch (e) {
return {
'error': true,
'type': e.type,
'message': e.message,
'code': e.code,
};
}
}