Hanami Authentication

What I want to see in this lib

In general, I want to see hanami (CLI?) app wich will create files with all actions and view in auth application instead “magic” controllers like in devise.

Generators

In general, I see something like this:

hanami g auth model # => account model with some methods
hanami g auth app # => new hanami auth app with config
hanami g auth base # => sessions#create, sessions#delete, etc
hanami g auth reset-password # => actions for this logic
hanami g auth oauth # => all for auth app

Also, we should generate specs with tests for each generated action.

Model

I think we need to set account as a default model.

Generated fields:

  • password_hash
  • email (commented)
  • login (commented)

Now I’m working on simple Authentication module with simple methods (authenticate!, current_account, etc).

@jodosha @cllns WDYT?