Skip to content

Commit 72571fe

Browse files
authored
Update README.md
1 parent deedafa commit 72571fe

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@ The last thing you'll need is to provide your own implementation of `UserFactory
4949
```
5050
final class NativeSessionUserFactory implements UserFactory
5151
{
52-
public function make(array $payload): ?Authenticatable
52+
public function make(array $session): ?Authenticatable
5353
{
54+
// $session here is the same as $_SESSION
55+
5456
return new MyUserObject(
55-
$payload['username'],
56-
$payload['custom:my_custom_cognito_attribute'],
57+
$session['id'],
58+
$session['my_user_attribute'],
5759
);
5860
}
5961
}

0 commit comments

Comments
 (0)