In this portion of the tutorial we add Devise integration to provide logon to the application, and provide custom pages for password reset and account unlock. This content is based somewhat on the equivalent content from the rails 3 version of the tutorial.
This will break down into three main elements:
- Provision of a registration page that matches the Devise expectations and calls the Devise register method and password change method
- Provision of a logon page that matches the Devise expectations and that calls the Devise logon method and associated methods such as password resets etc
- Provision of functionality such that AngularJS can detect that a user is not logged on and redirect the user to the logon page, rather than just having each server interaction fail
If you’ve dropped into the middle of the tutorial, you can find the code for the previous section at github: PaulL : tutorial_9. You can go to the index page for this tutorial, or you can hit the tutorial menu above and see all the posts in the Rails 4 tutorial.