You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package provides a simple way to use AWS Cognito authentication in Laravel for Web and API Auth Drivers.
16
21
The idea of this package, and some of the code, is based on the package from Pod-Point which you can find here: [Pod-Point/laravel-cognito-auth](https://github.com/Pod-Point/laravel-cognito-auth), [black-bits/laravel-cognito-auth](https://github.com/black-bits/laravel-cognito-auth) and [tymondesigns/jwt-auth](https://github.com/tymondesigns/jwt-auth).
17
22
@@ -20,12 +25,12 @@ The idea of this package, and some of the code, is based on the package from Pod
20
25
We decided to use it and contribute it to the community as a package, that encourages standarised use and a RAD tool for authentication using AWS Cognito.
21
26
22
27
## Features
23
-
-[Registration and Confirmation E-Mail (Sign Up)](#registering-users)**Updated** (#9 feature added)
28
+
-[Registration and Confirmation E-Mail (Sign Up)](#registering-users)
24
29
- Forced password change at first login (configurable)
25
30
-[Login (Sign In)](#user-authentication)
26
-
- Token Validation for all Session and Token Guard Requests**New**
31
+
- Token Validation for all Session and Token Guard Requests
27
32
- Remember Me Cookie
28
-
- Single Sign On
33
+
- Single Sign On**Updated** (Fix: Issue #86)
29
34
- Forgot Password (Resend - configurable)
30
35
- User Deletion
31
36
- Edit User Attributes
@@ -41,6 +46,7 @@ We decided to use it and contribute it to the community as a package, that encou
41
46
-[Forced Logout (Sign Out) - Revoke the RefreshToken from AWS](#signout-remove-access-token)
42
47
-[MFA Implementation for Session and Token Guards](./README_MFA.md)
43
48
-[Password validation based on Cognito Configuration](#password-validation-based-of-cognito-configuration)
49
+
-[Mapping Cognito User using Subject UUID](#mapping-cognito-user-using-subject-uuid)**NEW**
44
50
45
51
## Compatability
46
52
@@ -197,7 +203,6 @@ At the current state you need to have those 4 form fields defined in here. Those
197
203
With our package and AWS Cognito we provide you a simple way to use Single Sign-Ons.
198
204
For configuration options take a look at the config [cognito.php](/config/cognito.php).
199
205
200
-
201
206
When you want SSO enabled and a user tries to login into your application, the package checks if the user exists in your AWS Cognito pool. If the user exists, he will be created automatically in your database provided the `add_missing_local_user` is to `true`, and is logged in simultaneously.
202
207
203
208
That's what we use the fields `sso_user_model` and `cognito_user_fields` for. In `sso_user_model` you define the class of your user model. In most cases this will simply be _App\Models\User_.
@@ -626,6 +631,20 @@ This library fetches the password policy from the cognito pool configurations. T
626
631
>[!IMPORTANT]
627
632
>In case of special characters, we are supporting all except the pipe character **|** for now.
628
633
634
+
## Mapping Cognito User using Subject UUID
635
+
636
+
The library maps the Cognito user subject UUID with the local repository. Everytime a new user is created in cognito, the sub UUID is mapped with the local user table with an user specified column name.
637
+
638
+
The column in the local BD is identified with the config parameter `user_subject_uuid` with the default value set to `sub`.
639
+
640
+
However, to customize the column name in the local DB user table, you may do that with below setting fields to your `.env` file
641
+
642
+
```php
643
+
644
+
AWS_COGNITO_USER_SUBJECT_UUID="sub"
645
+
646
+
```
647
+
629
648
We are working on making sure that pipe character is handled soon.
0 commit comments