Examples

This page lists some examples which show how Silhouette can be used in
various kinds of projects.

Silhouette Seed Template

The Silhouette Seed project is an Activator template which shows how Silhouette can be used in a Play Framework application. It’s a starting point which can be extended to fit your needs.

Link


Silhouette VueJs template

The VueJs sample project which can be extended to fit your needs.

Brief description of functionality:

  • Sign up
  • Sign in
  • Email activation
  • Reset password
  • Change password
  • ReCaptcha
  • Password brute force protection (Default is 5 tries per 30 minutes, but can be configured)
  • SPA
  • Supporting multiple sources (credentials, social providers) bound to single account
  • Basic user management functionality (admin page, user roles)
  • Authentication via social providers Facebook, Google, Twitter

Backend technical details:

  • PlayFramework (Scala)
  • Silhouette authentication library
  • PlayFramework + VueJs integration (dev hot reload && prod static assets)
  • Sending emails via SendGrid
  • Postgres DB
  • Ready to deploy to Heroku

Frontend technical details:

  • VueJs
  • Vue JWT integration
  • Vue page access restriction for routes
  • Vue validation using vuelidate
  • Bulma
  • Buefy
  • Vuex for storing user data in local storage

Github repo
Demo


Silhouette Angular Giter8 Template

This is a Giter8 template which shows how Silhouette can be used to create a SPA with the latest version of Angular and Play. It’s a starting point which can be extended to fit your needs.

Link


Silhouette React/Redux Seed Template

A Silhouette Seed template which shows how Silhouette can be used to create a SPA with React/Redux and Play.

Link


Silhouette Slick Seed Template

A fork of the Silhouette Seed project which uses Slick as database access library.

Link


Silhouette Rest Seed

Seed project for Play Framework with Silhouette, exposing a rest API for signup and signin.

Link


Silhouette Credentials Seed for Authentication and Authorization [Silhouette 4.0]

This project tries to be an example of how to implement an authentication and authorization layer using the Silhouette authentication library.
This template only show you how to implement a credential authentication, but it's easy to add the social authentication as well.
You will see how to:

  • Sign up (with email confirmation)
  • Sign in (with remember me)
  • Sign out
  • Change password
  • Reset password (via email)
  • Control of public and private areas
  • Restrict areas to those users whose roles match with the specified ones (with logic OR or AND)

Link


Play 2.5 Multidomain Auth [Silhouette 4.0]

Project for Play Framework with Silhouette showing how to add an authentication and authorizaton layer. This is a continuation of the Silhouette Credentials Seed for Authentication and Authorization. The project is split in two main subprojects: a public web page that uses a complete authentication layer (including sign up with email confirmation and reset passwords), and an administration web page that uses also a simple authorization layer based on roles.

Link


Silhouette Postgres Async Seed

The Play Silhouette Postgres Async Seed project shows how Silhouette 3.0 can be used
to create an application with Play 2.4, postgres-async, and jdub-async,
supporting signing in with Facebook, Google, or Twitter. It's a starting point which can be extended to fit your needs.

Link


Silhouette ReactiveMongo Seed

A fork of the Play Silhouette Seed template which shows how ReactiveMongo can be used as a backing store.

Link


Silhouette ReactiveMongo Angular Seed

A fork of the Play Silhouette Seed template which shows how ReactiveMongo can be used as a backing store in a SPA with AngularJS.

Link


Silhouette Seed with missing features

A fork of the Play Silhouette Seed template which has implemented missing features like:

  • Sign Up via email
  • Update/reset forgotten password

Link


play-slick-silhouette-auth-api

Sample project, broken into SBT modules, using Play 2.5.3, Slick 3.1.1, Postgres, and Silhouette 4.0 prerelease

Link


silhouette-macwire-mongodb

This application will show you how to implement authentication and authorization using Play framework with scala + Macwire as dependency injection library + Silhouete to provide authentication using JWT and authorization + MongoDB with ReactiveMongo. This apps intend to be asynchronous over all layers.

Link


Silhouette REST Mongodb Seed

Seed project for Play Framework 2.6 with Silhouette 5.0, exposing a REST API for sign-up and signin. ReactiveMongo used as a backing store.

Link


Minimal Form Based Authentication Using Play and Slick

Example of form based authentication in a Play App using Slick, and MySQL. Dependencies and configuration kept as few and simple as possible.

Link


Silhouette REST Slick BackEnd + FrontEnd Seed

Example BackEnd project for Play Framework that uses Silhouette for authentication and authorization, exposed REST API for sign-up, sign-in + example FrontEnd project for ReactJS+ Typescript used for handling view layer. FrontEnd application implements authentication and accessing secured backend actions.

Link


Silhouette Basic Authentication Seed including with Apache-Style htpasswd file

Sometimes you need to quickly implement the simplest authentication, or build on a pre-existing Apache server htpasswd file. This seed template demonstrates how to implement basic authentication, the simplest way to add some form of authentication to your play app, with the caveat that is also not very secure.
A short tutorial about how it works can be found here Link

Seed template on github:
Link