This is a fork of the official Silhouette Seed project. If you want to have a first look at Silhouette, I suggest you have a look at the official project.
(The "Build App" phase will take a few minutes)
Or you can find a running example of this template under the following URL: https://play-silhouette-seed.herokuapp.com/
- Sign Up
- Sign In (Credentials)
- Change Password
- Edit Profile
- Social Auth (Facebook, Google+, VK, Twitter, Xing, Yahoo)
- Two-factor authentication with Clef
- Dependency Injection with Guice
- Publishing Events
- Avatar service
- Remember me functionality
- Security headers
- CSRF Protection
- play-slick database access
Consulate the Silhouette documentation for more information. If you need help with the integration of Silhouette into your project, don't hesitate and ask questions in our mailing list or on Stack Overflow.
The template stores all authentication information in a database via Slick It uses an PostgreSQL database by default.
In order to use another database supported by Slick, you need to change the driver in your application.conf and add the corresponding JDBC driver to your dependencies. The Play Slick documentation has more information about database configuration.
You need to create these database tables first:
CREATE TABLE "user" ( "userID" VARCHAR NOT NULL PRIMARY KEY, "email" VARCHAR, "fullName" VARCHAR, "age" INTEGER, "sex" VARCHAR, "avatarURL" VARCHAR );
CREATE TABLE "logininfo" ( "id" SERIAL NOT NULL PRIMARY KEY, "providerID" VARCHAR NOT NULL, "providerKey" VARCHAR NOT NULL );
CREATE TABLE "userlogininfo" ( "userID" VARCHAR NOT NULL, "loginInfoId" BIGINT NOT NULL );
CREATE TABLE "passwordinfo" ( "hasher" VARCHAR NOT NULL, "password" VARCHAR NOT NULL, "salt" VARCHAR, "loginInfoId" BIGINT NOT NULL );
CREATE TABLE "oauth1info" ( "id" SERIAL NOT NULL PRIMARY KEY, "token" VARCHAR NOT NULL, "secret" VARCHAR NOT NULL, "loginInfoId" BIGINT NOT NULL );
CREATE TABLE "oauth2info" ( "id" SERIAL NOT NULL PRIMARY KEY, "accesstoken" VARCHAR NOT NULL, "tokentype" VARCHAR, "expiresin" INTEGER, "refreshtoken" VARCHAR, "logininfoid" BIGINT NOT NULL );
CREATE TABLE "openidinfo" ( "id" VARCHAR NOT NULL PRIMARY KEY, "logininfoid" BIGINT NOT NULL );
CREATE TABLE "openidattributes" ( "id" VARCHAR NOT NULL, "key" VARCHAR NOT NULL, "value" VARCHAR NOT NULL );
The code is licensed under Apache License v2.0.