createJWT method
Create Account JWT
Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout.
Implementation
Future<req.Response> createJWT() {
final String path = '/account/jwt';
final Map<String, dynamic> params = {};
final Map<String, String> headers = {
'content-type': 'application/json',
};
return client.call(HttpMethod.post,
path: path, params: params, headers: headers);
}