# Cannot get Session from Client when using AuthenticateEmailAsync

**URL:** <https://forum.heroiclabs.com/t/cannot-get-session-from-client-when-using-authenticateemailasync/1534>\
**Category:** Local Setup\
**Tags:** getting-started, sdk-dotnet\
**Created:** [April 6, 2021, 9:56am UTC](https://forum.heroiclabs.com/t/cannot-get-session-from-client-when-using-authenticateemailasync/1534 "2021-04-06T09:56:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorge](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@Jorge](https://forum.heroiclabs.com/u/Jorge)\
**Post date:** [April 6, 2021, 9:56am UTC](https://forum.heroiclabs.com/t/cannot-get-session-from-client-when-using-authenticateemailasync/1534/1 "2021-04-06T09:56:55Z")

</div>

Hello everyone,

I am new to Nakama, I did read the tutorials to install Nakama and CockroachDB in a Docker’s container. I have the server and the database runing, I can actually confirming by accessing the server’s interface with the default admin and password credentials.

I am trying to do some tests, but I am stuck. I created a console application in .Net framework, I declare the client successfully and I try to authenticate.

I try to authenticate with the method below:

private async Task GetSession(Client client)  
{  
var email = “[super@heroes.com](mailto:super@heroes.com)”;  
var password = “batsignal”;  
return await client.AuthenticateEmailAsync(email, password, “batman”);  
}

I can see in the server that the user batman has been created successfully, but the request do not return the session object, actually it does not return any response.

I tried reading the documentation and searching in google without luck.

Anyone could give me some tips? Am I in the right track?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![novabyte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/novabyte/32/1324_2.png) [@novabyte](https://forum.heroiclabs.com/u/novabyte)\
**Post date:** [April 7, 2021, 10:33am UTC](https://forum.heroiclabs.com/t/cannot-get-session-from-client-when-using-authenticateemailasync/1534/2 "2021-04-07T10:33:43Z")

</div>

@Jorge Your code looks ok. I think where I can see a problem is that your method returns a `Task` rather than an `ISession` or a `Task<ISession>` so while the `AuthenticateEmailAsync` method returns a session you don’t actually use it right now. As a quick test you can change your code slightly:

```auto
private async Task GetSession(Client client)
{
    var email = “super@heroes.com”;
    var password = “batsignal”;
    var session = await client.AuthenticateEmailAsync(email, password, “batman”);
    System.Console.WriteLine(session);
    return Task.CompletedTask;
}

```

Hope this helps.
