Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/heliohead/sinatra_simple_login
- Owner: heliohead
- Archived: true
- Created: 2015-02-01T17:41:42.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-01T18:11:06.000Z (almost 10 years ago)
- Last Synced: 2024-02-13T02:15:35.398Z (9 months ago)
- Language: Ruby
- Homepage:
- Size: 133 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
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)
```