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
Using this migration and seed, the ID of the inserted row data is a UUID instead of an unsigned integer. I noticed after stubbing through the code for a couple hours trying to find out why an authenticated user couldn't access authenticated routes. The user ID was 8 when there was only 3 users seeded, and it turns out the 8 was just the first digit from the UUID string.
use duxet\Rethinkdb\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
public function up()
{
Schema::create('users', function(Blueprint $table) {
$table->increments('id');
...
});
}
...
}
Using RethinkDB Blueprint create doesn't implement the Laravel Blueprint API, which includes a version of the increments method.
/**
* Create a new auto-incrementing integer (4-byte) column on the table.
*
* @param string $column
* @return \Illuminate\Support\Fluent
*/
public function increments($column)
{
return $this->unsignedInteger($column, true);
}
Produces this in RethinkDB's admin panel for this ReQL statement r.db('app').table('users'):
So unless the ID is explicitly set to a unsigned integer it becomes a UUID, which prevents access to routes. The simplest solution might be to have a config for adding UUID to Laravel similar to this implementation or this one.
The text was updated successfully, but these errors were encountered:
mtpultz
changed the title
Laravel 5.2.14 Middleware Appears to Prevent Login
Laravel 5.2.14 Middleware Prevents Proper Authentication
Feb 12, 2016
mtpultz
changed the title
Laravel 5.2.14 Middleware Prevents Proper Authentication
Laravel 5.2.14 Authentication Redirect Seen as Guest in Home Route
Feb 12, 2016
mtpultz
changed the title
Laravel 5.2.14 Authentication Redirect Seen as Guest in Home Route
Laravel 5.2.14 Authentication Redirect User Seen as Guest in Home Route
Feb 12, 2016
mtpultz
changed the title
Laravel 5.2.14 Authentication Redirect User Seen as Guest in Home Route
Laravel 5.2.14 UUID used instead of Illuminate\Database\Schema\Blueprint::increments Unsigned Integer
Feb 13, 2016
mtpultz
changed the title
Laravel 5.2.14 UUID used instead of Illuminate\Database\Schema\Blueprint::increments Unsigned Integer
Laravel 5.2.14 UUID used for ID Column instead of Illuminate\Database\Schema\Blueprint::increments Unsigned Integer
Feb 13, 2016
Using this migration and seed, the ID of the inserted row data is a UUID instead of an unsigned integer. I noticed after stubbing through the code for a couple hours trying to find out why an authenticated user couldn't access authenticated routes. The user ID was 8 when there was only 3 users seeded, and it turns out the 8 was just the first digit from the UUID string.
Using RethinkDB Blueprint create doesn't implement the Laravel Blueprint API, which includes a version of the increments method.
Produces this in RethinkDB's admin panel for this ReQL statement
r.db('app').table('users')
:So unless the ID is explicitly set to a unsigned integer it becomes a UUID, which prevents access to routes. The simplest solution might be to have a config for adding UUID to Laravel similar to this implementation or this one.
The text was updated successfully, but these errors were encountered: