Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/06-concepts/01-working-with-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ Declare an abstract endpoint with common methods on the server:
```dart
abstract class AuthSessionEndpoint extends Endpoint {
Future<bool> isAuthenticated(Session session) async {
return await session.isUserSignedIn;
return session.isUserSignedIn;
}

Future<bool> logout(Session session, {required bool allSessions}) async {
Expand Down
6 changes: 3 additions & 3 deletions docs/06-concepts/11-authentication/02-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `Session` object provides information about the current user. A unique `user

```dart
Future<void> myMethod(Session session) async {
final authenticationInfo = await session.authenticated;
final authenticationInfo = session.authenticated;
final userIdentifier = authenticationInfo?.userIdentifier;
...
}
Expand All @@ -16,7 +16,7 @@ You can also use the Session object to check if a user is authenticated:

```dart
Future<void> myMethod(Session session) async {
var isSignedIn = await session.isUserSignedIn;
var isSignedIn = session.isUserSignedIn;
...
}
```
Expand Down Expand Up @@ -62,7 +62,7 @@ You can use this annotation in two ways:
}

Stream<bool> someStream(Session session) async* {
yield await session.isUserSignedIn; // Will always return false
yield session.isUserSignedIn; // Will always return false
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ Declare an abstract endpoint with common methods on the server:
```dart
abstract class AuthSessionEndpoint extends Endpoint {
Future<bool> isAuthenticated(Session session) async {
return await session.isUserSignedIn;
return session.isUserSignedIn;
}

Future<bool> logout(Session session, {required bool allSessions}) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `Session` object provides information about the current user. A unique `user

```dart
Future<void> myMethod(Session session) async {
final authenticationInfo = await session.authenticated;
final authenticationInfo = session.authenticated;
final userIdentifier = authenticationInfo?.userIdentifier;
...
}
Expand All @@ -16,7 +16,7 @@ You can also use the Session object to check if a user is authenticated:

```dart
Future<void> myMethod(Session session) async {
var isSignedIn = await session.isUserSignedIn;
var isSignedIn = session.isUserSignedIn;
...
}
```
Expand Down Expand Up @@ -62,7 +62,7 @@ You can use this annotation in two ways:
}

Stream<bool> someStream(Session session) async* {
yield await session.isUserSignedIn; // Will always return false
yield session.isUserSignedIn; // Will always return false
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ Declare an abstract endpoint with common methods on the server:
```dart
abstract class AuthSessionEndpoint extends Endpoint {
Future<bool> isAuthenticated(Session session) async {
return await session.isUserSignedIn;
return session.isUserSignedIn;
}

Future<bool> logout(Session session, {required bool allSessions}) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `Session` object provides information about the current user. A unique `user

```dart
Future<void> myMethod(Session session) async {
final authenticationInfo = await session.authenticated;
final authenticationInfo = session.authenticated;
final userIdentifier = authenticationInfo?.userIdentifier;
...
}
Expand All @@ -16,7 +16,7 @@ You can also use the Session object to check if a user is authenticated:

```dart
Future<void> myMethod(Session session) async {
var isSignedIn = await session.isUserSignedIn;
var isSignedIn = session.isUserSignedIn;
...
}
```
Expand Down Expand Up @@ -62,7 +62,7 @@ You can use this annotation in two ways:
}

Stream<bool> someStream(Session session) async* {
yield await session.isUserSignedIn; // Will always return false
yield session.isUserSignedIn; // Will always return false
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ Declare an abstract endpoint with common methods on the server:
```dart
abstract class AuthSessionEndpoint extends Endpoint {
Future<bool> isAuthenticated(Session session) async {
return await session.isUserSignedIn;
return session.isUserSignedIn;
}

Future<bool> logout(Session session, {required bool allSessions}) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `Session` object provides information about the current user. A unique `user

```dart
Future<void> myMethod(Session session) async {
final authenticationInfo = await session.authenticated;
final authenticationInfo = session.authenticated;
final userIdentifier = authenticationInfo?.userIdentifier;
...
}
Expand All @@ -16,7 +16,7 @@ You can also use the Session object to check if a user is authenticated:

```dart
Future<void> myMethod(Session session) async {
var isSignedIn = await session.isUserSignedIn;
var isSignedIn = session.isUserSignedIn;
...
}
```
Expand Down Expand Up @@ -62,7 +62,7 @@ You can use this annotation in two ways:
}

Stream<bool> someStream(Session session) async* {
yield await session.isUserSignedIn; // Will always return false
yield session.isUserSignedIn; // Will always return false
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ Declare an abstract endpoint with common methods on the server:
```dart
abstract class AuthSessionEndpoint extends Endpoint {
Future<bool> isAuthenticated(Session session) async {
return await session.isUserSignedIn;
return session.isUserSignedIn;
}

Future<bool> logout(Session session, {required bool allSessions}) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The `Session` object provides information about the current user. A unique `user

```dart
Future<void> myMethod(Session session) async {
final authenticationInfo = await session.authenticated;
final authenticationInfo = session.authenticated;
final userIdentifier = authenticationInfo?.userIdentifier;
...
}
Expand All @@ -16,7 +16,7 @@ You can also use the Session object to check if a user is authenticated:

```dart
Future<void> myMethod(Session session) async {
var isSignedIn = await session.isUserSignedIn;
var isSignedIn = session.isUserSignedIn;
...
}
```
Expand Down Expand Up @@ -62,7 +62,7 @@ You can use this annotation in two ways:
}

Stream<bool> someStream(Session session) async* {
yield await session.isUserSignedIn; // Will always return false
yield session.isUserSignedIn; // Will always return false
}
}
```
Expand Down