comAtprotoServerCreateSession function
Create an authentication session.
Implementation
Future<XRPCResponse<ServerCreateSessionOutput>> comAtprotoServerCreateSession({
required String identifier,
required String password,
String? authFactorToken,
bool? allowTakendown,
required ServiceContext $ctx,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await $ctx.post(
ns.comAtprotoServerCreateSession,
headers: {'Content-type': 'application/json', ...?$headers},
body: {
...?$unknown,
'identifier': identifier,
'password': password,
if (authFactorToken != null) 'authFactorToken': authFactorToken,
if (allowTakendown != null) 'allowTakendown': allowTakendown,
},
to: const ServerCreateSessionOutputConverter().fromJson,
);