# User Authentication Problem

**URL:** <https://forum.radsystems.io/t/user-authentication-problem/296>\
**Category:** PHPRad Classic\
**Created:** [June 1, 2021, 6:46am UTC](https://forum.radsystems.io/t/user-authentication-problem/296 "2021-06-01T06:46:32Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![TERzo](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@TERzo](https://forum.radsystems.io/u/TERzo)\
**Post date:** [June 1, 2021, 6:46am UTC](https://forum.radsystems.io/t/user-authentication-problem/296/1 "2021-06-01T06:46:33Z")

</div>

Hi, I have activated the user and permissions management, unfortunately the specific tables model\_has\_roles and rad\_roles are not created.  
By entering the login credentials and accessing the home, a further error message confirms what was written before.

 ![rad](https://forum.radsystems.io/uploads/default/original/1X/aa60efe401e9662368660276be012aa91012c001.jpeg)  
 ![rad2](https://forum.radsystems.io/uploads/default/original/1X/0ddeeaba041693a11b2d2423ec1f72df137a721d.jpeg)

---

<div class="post-metadata">

**Author:** ![willvin](https://forum.radsystems.io/user_avatar/forum.radsystems.io/willvin/32/7_2.png) [@willvin](https://forum.radsystems.io/u/willvin)\
**Post date:** [June 1, 2021, 12:07pm UTC](https://forum.radsystems.io/t/user-authentication-problem/296/2 "2021-06-01T12:07:50Z")

</div>

@TERzo what local server are you using? If not [Laragon](https://laragon.org/), please use that and let me know if the issue still persists. And also note, when you start using the [Laragon](https://laragon.org/) local server MySQL database, make sure to start a new database and project.

---

<div class="post-metadata">

**Author:** ![TERzo](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@TERzo](https://forum.radsystems.io/u/TERzo)\
**Post date:** [June 1, 2021, 12:31pm UTC](https://forum.radsystems.io/t/user-authentication-problem/296/3 "2021-06-01T12:31:02Z")

</div>

Hi Willvin, I’ve been using [Ampps](https://ampps.com/) as a local server for some time now.  
As soon as possible I will install Laragon for testing.

---

<div class="post-metadata">

**Author:** ![TERzo](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@TERzo](https://forum.radsystems.io/u/TERzo)\
**Post date:** [June 3, 2021, 10:18am UTC](https://forum.radsystems.io/t/user-authentication-problem/296/4 "2021-06-03T10:18:19Z")

</div>

hi, unfortunately the problem also occurs on Laragon

---

<div class="post-metadata">

**Author:** ![willvin](https://forum.radsystems.io/user_avatar/forum.radsystems.io/willvin/32/7_2.png) [@willvin](https://forum.radsystems.io/u/willvin)\
**Post date:** [June 3, 2021, 12:43pm UTC](https://forum.radsystems.io/t/user-authentication-problem/296/5 "2021-06-03T12:43:35Z")

</div>

@TERzo, please send me a message containing your anydesk ID.

---

<div class="post-metadata">

**Author:** ![TERzo](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@TERzo](https://forum.radsystems.io/u/TERzo)\
**Post date:** [June 8, 2021, 6:23am UTC](https://forum.radsystems.io/t/user-authentication-problem/296/6 "2021-06-08T06:23:38Z")

</div>

Hi, in version 3.6 the tables are now created correctly but are not populated.  
The authentication system with dynamic permissions does not work.  
By activating the dynamic permissions the user is displayed but clicking on the profile shows a 403 error.  
The same 403 page is shown after logging in.  
By disabling dynamic permissions, the authentication system works regularly.

 ![rad3](https://forum.radsystems.io/uploads/default/original/1X/831527a018ad4601ae6b196d14687c3e92692b53.jpeg)  
 ![rad2](https://forum.radsystems.io/uploads/default/original/1X/0c49a89a68b2eed6fa1dfdaf5ce1275e8073265f.jpeg)  
 ![rad](https://forum.radsystems.io/uploads/default/original/1X/1fa00dc24ee310976f837a870e76a802e29f527a.jpeg)

---

<div class="post-metadata">

**Author:** ![Emman](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/e/22d042/32.png) [@Emman](https://forum.radsystems.io/u/Emman)\
**Post date:** [June 8, 2021, 7:35am UTC](https://forum.radsystems.io/t/user-authentication-problem/296/7 "2021-06-08T07:35:37Z")

</div>

This means that the user do not have any role at the moment.  
New user created will be assigned a default role, while for old users, you have to manually assign roles to them.

Thanks

---

<div class="post-metadata">

**Author:** ![TERzo](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@TERzo](https://forum.radsystems.io/u/TERzo)\
**Post date:** [June 15, 2021, 10:01am UTC](https://forum.radsystems.io/t/user-authentication-problem/296/9 "2021-06-15T10:01:07Z")

</div>

Hi, unfortunately even by registering a new user the tables are not populated.  
Maybe some field is missing in the user table?  
I manually added the “role\_id” field but it doesn’t change anything.

---

<div class="post-metadata">

**Author:** ![willvin](https://forum.radsystems.io/user_avatar/forum.radsystems.io/willvin/32/7_2.png) [@willvin](https://forum.radsystems.io/u/willvin)\
**Post date:** [June 15, 2021, 8:51pm UTC](https://forum.radsystems.io/t/user-authentication-problem/296/10 "2021-06-15T20:51:32Z")

</div>

@TERzo what version of Radsystems Studio are you currently using?

---

<div class="post-metadata">

**Author:** ![TERzo](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@TERzo](https://forum.radsystems.io/u/TERzo)\
**Post date:** [June 16, 2021, 8:36am UTC](https://forum.radsystems.io/t/user-authentication-problem/296/11 "2021-06-16T08:36:54Z")

</div>

Hi @willvin , latest version 3.7.  
The problem also occurs with Laragon

---

<div class="post-metadata">

**Author:** ![willvin](https://forum.radsystems.io/user_avatar/forum.radsystems.io/willvin/32/7_2.png) [@willvin](https://forum.radsystems.io/u/willvin)\
**Post date:** [June 16, 2021, 11:32am UTC](https://forum.radsystems.io/t/user-authentication-problem/296/12 "2021-06-16T11:32:40Z")

</div>

@TERzo please send me a private message with your **Anydesk ID**.

---

<div class="post-metadata">

**Author:** ![mramanolo](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@mramanolo](https://forum.radsystems.io/u/mramanolo)\
**Post date:** [June 12, 2021, 9:53pm UTC](https://forum.radsystems.io/t/user-authentication-problem/296/13 "2021-06-12T21:53:09Z")

</div>

In the new version 3.7 when trying to add roles and dynamic permissions the following error is generated:

Migrating: 2020\_10\_15\_000000\_create\_roles\_permissions\_tables

Illuminate\Database\QueryException

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `model_has_permissions` add index `model_has_permissions_model_id_model_type_index`(`model_id`, `model_type`))

at F:\Project\beta\vendor\laravel\framework\src\Illuminate\Database\Connection.php:671  
667| // If an exception occurs when attempting to run a query, we’ll format the error  
668| // message to include the bindings with SQL, which will make this exception a  
669| // lot more helpful to the developer instead of just the database’s errors.  
670| catch (Exception $e) {

> 671| throw new QueryException(  
> 672| $query, $this-\>prepareBindings($bindings), $e  
> 673| );  
> 674| }  
> 675|

1 F:\Project\beta\vendor\laravel\framework\src\Illuminate\Database\Connection.php:464  
PDOException::(“SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes”)

2 F:\Project\beta\vendor\laravel\framework\src\Illuminate\Database\Connection.php:464  
PDOStatement::execute()

Windows 10, Laragon 5.0, php 7.4.19, mysql 5.7.33

---

<div class="post-metadata">

**Author:** ![TERzo](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@TERzo](https://forum.radsystems.io/u/TERzo)\
**Post date:** [June 16, 2021, 12:06pm UTC](https://forum.radsystems.io/t/user-authentication-problem/296/14 "2021-06-16T12:06:06Z")

</div>

I’m sorry, but currently I can’t allow external connections to the pc station.

---

<div class="post-metadata">

**Author:** ![willvin](https://forum.radsystems.io/user_avatar/forum.radsystems.io/willvin/32/7_2.png) [@willvin](https://forum.radsystems.io/u/willvin)\
**Post date:** [June 16, 2021, 12:22pm UTC](https://forum.radsystems.io/t/user-authentication-problem/296/15 "2021-06-16T12:22:29Z")

</div>

ok. we will try to find the cause of the error and provide a solution when we do, thanks.

---

<div class="post-metadata">

**Author:** ![Abslom](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/a/ee59a6/32.png) [@Abslom](https://forum.radsystems.io/u/Abslom)\
**Post date:** [December 13, 2022, 4:48pm UTC](https://forum.radsystems.io/t/user-authentication-problem/296/16 "2022-12-13T16:48:56Z")

</div>

Hi,  
I think the error come from database migration file for roles and persmissions tables ( **2020\_10\_15\_000000\_create\_roles\_permissions\_tables** ) on index, foreign key and primary key creation.  
Location : \database\migrations
