Refactor create middleware use initStrategy.
Remove session dependency.