codenitive/laravel-oneauth — pull request #16 by fideloper (2012-09-01 16:51:57+00:00)
Title: Access and Refresh token string length over 255

Hello

I've implemented this library for Basecamp's API. I've successfully been able to use this library as your code supports overriding some key functions to pass parameters, create headers, etc, as Basecamp requires (Thanks! Proper OOP!)

However, one issues I've discovered is that the Basecamp request and refresh tokens have some checksum code, which brings the token past the 255 character limit set by the use of VARCHAR in the database. MySQL silently truncates it to 255 characters.

I've also had to take off the index on the access_token column because of that change to TEXT.

Do you see this as an issue or bug?

Thanks

`oneauth/migrations/__migration__.php`
```php
increments('id');
$table->integer('user_id')->unsigned();
$table->string('provider', 50);
$table->string('uid', 255);
$table->text('access_token')->nullable(); # Changed to TEXT
$table->string('secret', 255)->nullable();
$table->text('refresh_token')->nullable(); # Changed to TEXT
$table->integer('expires')->defaults(0)->nullable();

$table->timestamps();
//$table->index('access_token'); #can't/shouldn't index with type TEXT
$table->index('user_id');
$table->unique(array('provider', 'uid'));
});
}

/**
* Revert the changes to the database.
*
* @return void
*/
public function down()
{
Schema::drop('oneauth_clients');
}
}
```