async Task RunAsync(AuthSessionConfig config) { using (var client = await AuthClient.InitSessionAsync(config)) { // with the client, you can create various app sessions // so you can run multiple apps / instances with the same client login. var session = await client.CreateAppSessionAsync(GetAuthReq()); var app = new SomeApp(session); await app.RunAsync(); } }
async Task RunAppWithNewAccount(Credentials credentials, string invitationToken) { var config = new AuthSessionConfig(credentials, invitation: invitationToken); await RunAsync(config); }
async Task RunAppWithExistingAccount(Credentials credentials) { var config = new AuthSessionConfig(credentials); await RunAsync(config); }
AuthSession(AuthSessionConfig config) => _config = config;