Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/heliohead/sinatra_simple_login

Simple exemple for login using sinatra
https://github.com/heliohead/sinatra_simple_login

Last synced: 3 months ago
JSON representation

Simple exemple for login using sinatra

Awesome Lists containing this project

README

        

## Simple login
This is a simple exemple for login in sinatra using warden, bcrypt and block user if have more than 5 failures attempts.

Default user was configured for email: [email protected] and password: 123

### How to run

```bash
$ bundle
$ rackup
```

To add new user
```bash
$ bundle console
$ require './model'
$ User.create!(email: '[email protected]', password: 'test')
```

To unlock user
```bash
$ bundle console
$ require './model'
$ u = User.first(:email => '[email protected]').update(:blocked_user => false)
```