From 914d87e7f65b14bc7e355c46acd618c6cf6c2c5a Mon Sep 17 00:00:00 2001 From: Gazihan Alankus Date: Mon, 14 Oct 2024 00:21:06 +0300 Subject: [PATCH] userId must be obtained as (await session.authenticated)?.userId; --- docs/06-concepts/11-authentication/03-working-with-users.md | 2 +- .../05-concepts/10-authentication/03-working-with-users.md | 2 +- .../06-concepts/11-authentication/03-working-with-users.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/06-concepts/11-authentication/03-working-with-users.md b/docs/06-concepts/11-authentication/03-working-with-users.md index 52897e12..beb07da4 100644 --- a/docs/06-concepts/11-authentication/03-working-with-users.md +++ b/docs/06-concepts/11-authentication/03-working-with-users.md @@ -3,7 +3,7 @@ It's a common task to read or update user information on your server. You can always retrieve the id of a signed-in user through the session object. ```dart -var userId = await session.authenticated.userId; +var userId = (await session.authenticated)?.userId; ``` If you sign in users through the auth module, you will be able to retrieve more information through the static methods of the `Users` class. diff --git a/versioned_docs/version-2.0.0/05-concepts/10-authentication/03-working-with-users.md b/versioned_docs/version-2.0.0/05-concepts/10-authentication/03-working-with-users.md index 52897e12..beb07da4 100644 --- a/versioned_docs/version-2.0.0/05-concepts/10-authentication/03-working-with-users.md +++ b/versioned_docs/version-2.0.0/05-concepts/10-authentication/03-working-with-users.md @@ -3,7 +3,7 @@ It's a common task to read or update user information on your server. You can always retrieve the id of a signed-in user through the session object. ```dart -var userId = await session.authenticated.userId; +var userId = (await session.authenticated)?.userId; ``` If you sign in users through the auth module, you will be able to retrieve more information through the static methods of the `Users` class. diff --git a/versioned_docs/version-2.1.0/06-concepts/11-authentication/03-working-with-users.md b/versioned_docs/version-2.1.0/06-concepts/11-authentication/03-working-with-users.md index ad9b8f21..beb07da4 100644 --- a/versioned_docs/version-2.1.0/06-concepts/11-authentication/03-working-with-users.md +++ b/versioned_docs/version-2.1.0/06-concepts/11-authentication/03-working-with-users.md @@ -3,7 +3,7 @@ It's a common task to read or update user information on your server. You can always retrieve the id of a signed-in user through the session object. ```dart -var userId = await session.auth.authenticatedUserId; +var userId = (await session.authenticated)?.userId; ``` If you sign in users through the auth module, you will be able to retrieve more information through the static methods of the `Users` class.