<commit_before># Nyauth

Simple & modualbe authentication gem

[CHANGE LOG](https://github.com/ppworks/nyauth/blob/master/CHANGELOG.md)

### application_controller.rb

```ruby
class ApplicationController < ActionController::Base
  include Nyauth::SessionConcern
  include Nyauth::ClientConcern
  before_action -> { require_authentication! as: client_name }
end
```

### migration

```ruby
class CreateUsers < ActiveRecord::Migration
  def change
    create_table :users do |t|
      t.string :nickname
      # Authenticatable
      t.string :email, null: false
      t.string :password_digest, null: false<commit_msg>Fix typo in README<commit_after># Nyauth

Simple & modulable authentication gem

[CHANGE LOG](https://github.com/ppworks/nyauth/blob/master/CHANGELOG.md)

### application_controller.rb

```ruby
class ApplicationController < ActionController::Base
  include Nyauth::SessionConcern
  include Nyauth::ClientConcern
  before_action -> { require_authentication! as: client_name }
end
```

### migration

```ruby
class CreateUsers < ActiveRecord::Migration
  def change
    create_table :users do |t|
      t.string :nickname
      # Authenticatable
      t.string :email, null: false
      t.string :password_digest, null: false
{'fraction_non_alphanumeric': 0.10483870967741936, 'fraction_numerical': 0.0, 'mean_word_length': 4.59009009009009, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4164421', 'n_tokens_mistral': 378, 'n_tokens_neox': 368, 'n_words': 90}