1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 16:07:34 +02:00

Add external authenticator (social login) API

Allows registrations to be completed with a pre-confirmed email address
and no password.
This commit is contained in:
Toby Zerner
2015-09-15 11:27:31 +09:30
parent 53f7112248
commit 6beb4fe898
27 changed files with 516 additions and 96 deletions

View File

@@ -23,8 +23,8 @@ class CreateEmailTokensTable extends Migration
{
$this->schema->create('email_tokens', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->integer('user_id')->unsigned();
$table->string('email', 150);
$table->integer('user_id')->unsigned();
$table->timestamp('created_at');
});
}

View File

@@ -0,0 +1,40 @@
<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Flarum\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class MakeEmailTokensUserIdColumnNullable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$this->schema->table('email_tokens', function (Blueprint $table) {
$table->integer('user_id')->unsigned()->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$this->schema->table('email_tokens', function (Blueprint $table) {
$table->integer('user_id')->unsigned()->change();
});
}
}