-
Notifications
You must be signed in to change notification settings - Fork 16.1k
Description
Checks
- This is not a duplicate of an existing issue (please have a look through our open issues list to make sure)
- I have thoroughly read and understand The Odin Project Contributing Guide
- Would you like to work on this issue?
Describe your suggestion
In the Using ruby on rails for your backend lesson, the first assignment explains the ways that React can be integrated with Rails, including serving React from Rails and serving each one as a separate app.
The second assignment is about integrating React with Rails using esbuild. I followed the guide for the projects, but I didn't like this approach too much, so I split my app into a React frontend and a Rails backend.
However, I found that most resources on the internet focus on using JWT tokens, which added another layer of complexity on the Rails side. Also, many resources on cookie authentication were broken or hard to follow.
So, after reading through the Rails docs and some blog posts, I was able to implement cookie authentication for my Rails apps and decided to write my own tutorial so I will not forget the steps.
My suggestion to improve the curriculum would be to add this tutorial to the React course as a third assignment so now this case is covered:
https://andres-g.com/posts/rails-api-authentication-using-cookies/
I think it's a good tutorial, and in the end readers will get a Rails API with cookie authentication that works with any frontend framework. I tried to be very specific in each step and included some JavaScript tests so people can get results quickly and create their own custom hooks.
Path
Ruby / Rails
Lesson Url
https://www.theodinproject.com/lessons/react-new-using-ruby-on-rails-for-your-backend
(Optional) Discord Name
gdanies
(Optional) Additional Comments
No response