Currently writing about: AWS, React.js, Node.js, TypeScript, friction logs.

Devise with Ruby on Rails 7

Blog series

#1: Devise Part 1: Setting Up Devise With Rails 7 And React

In part one of this six part series on Devise and Ruby on Rails, we demonstrate setting up Devise for Rails 7 with a basic sign up and login flow.

5 min read

#2: Devise Part 2: Using Redis Sessions Instead Of The Cookie Store

In part two of our Devise series, we look at how we can replace the default cookie session store with Redis.

3 min read

#3: Devise Part 3: Updating Our Devise Views With Tailwind CSS

In part three of the series, we walk through how to add TailwindCSS to a Rails 7 project and spruce up our sign in page.

4 min read

#4: Devise Part 4: Authentication With A Separate Frontend

In part four, we add in a separate Next.js project into the mix and demonstrate how to organize authentication for our main Rails API.

9 min read

#5: Devise Part 5: OAuth With GitHub And OmniAuth

In part five, we set up the OmniAuth configuration for Devise to demonstrate login using GitHub.

7 min read

#6: Devise Part 6: Adding Recaptcha To Prevent Fraud And Abuse

In part six, we enforce the usage of reCAPTCHA v2 to prevent signing up or logging in without passing the reCAPTCHA verification.

6 min read

#7: Devise Part 7: Testing With RSpec And Factory Bot

For this part, we look at setting up some helpers for us to log users in when writing controller tests.

6 min read

#8: Devise Part 8: Policy Authorization In Rails 7 With Pundit

This post looks at how we outline required policies in order to fulfill requests in Ruby on Rails using the Pundit gem.

10 min read

#9: Devise Part 9: Setting Up 302 Redirection vs 401 Unauthorized Handlers

In part nine, we take a look at how we can set up our API endpoints to return a 401 response if a user is not signed in instead of the default 302 redirect to the login page.

6 min read

Dennis O'Keeffe

2020-present Dennis O'Keeffe.

All Rights Reserved.