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.