[v0.0.2] Adds Google and Github OAuth2 Authentication
Adds to the API the feature of OAuth2 Authentication via two providers: Google and Github. For that the tests were updated.
This commit is contained in:
@@ -8,4 +8,14 @@ databaseChangeLog:
|
||||
encoding: utf8
|
||||
path: sqls/db-table-model-client.sql
|
||||
relativeToChangelogFile: true
|
||||
dbms: postgresql
|
||||
dbms: postgresql
|
||||
|
||||
- changeSet:
|
||||
id: adds-user-provider
|
||||
author: vitor.h.n.batista@gmail.com
|
||||
changes:
|
||||
- sqlFile:
|
||||
encoding: utf8
|
||||
path: sqls/adds-user-provider.sql
|
||||
relativeToChangelogFile: true
|
||||
dbms: postgresql
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
alter table if exists auth."user"
|
||||
rename column "full_name" to "name";
|
||||
|
||||
ALTER TABLE IF EXISTS auth.user
|
||||
ADD COLUMN IF NOT EXISTS provider VARCHAR
|
||||
CHECK ( provider IN ('google', 'github', 'local') ) DEFAULT 'local' NOT NULL;
|
||||
|
||||
ALTER TABLE auth."user"
|
||||
DROP CONSTRAINT IF EXISTS client_email_unique;
|
||||
|
||||
ALTER TABLE auth."user"
|
||||
DROP CONSTRAINT IF EXISTS user_email_provider_unique;
|
||||
ALTER TABLE auth."user"
|
||||
ADD CONSTRAINT user_email_provider_unique UNIQUE (email, provider);
|
||||
Reference in New Issue
Block a user