Best practice for integrating with Rails and Authentication
See original GitHub issueDecided to take a look at Stimulus for loading a few ui pieces after initial page rendering in one of our older Rails apps. Newer apps we’ve gone with more of the single page app backed with Rails API, but this seems like a great way of using it to load smaller elements and it works well so far.
What approach do you take to deal with the authentication issue. For example, our Devise login screen shows up in the fetched HTML since we are calling :authenticate_user!
in the ApplicationController. I don’t want to ignore auth on the new routes for these partials as they may contain sensitive data, but it seems like implementing a complete JWT mechanism is overkill since it wouldn’t be needed everywhere.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Cybersecurity Best Practices for Ruby on Rails Developers
How do we integrate cybersecurity best practices? Here are some processes and tips for Ruby on Rails developers.
Read more >Building Secure APIs with Rails 6 and Auth0
Learn how to easily integrate Auth0 with Rails 6 to build secure APIs. ... Try out the most powerful authentication platform for free....
Read more >How to Do Authentication Right With Rails Devise - Stackify
If you're just starting to use Rails Devise to authenticate your Rails apps, you might have some questions about the best ways to...
Read more >Security Best Practices for Your Rails Application
Application Configuration · Force SSL · CORS · Secure Environment Variables · Business Logic · Strong Authentication and Authorization Rules.
Read more >Simple Authentication with Rails and OmniAuth | Okta Developer
Today I'm going to show you how to authenticate users into your Rails applications using the latest best-practices and a hosted ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you’re making
fetch
requests, add{ credentials: 'same-origin' }
to the options: https://github.com/github/fetch#sending-cookiesClosing this for now, but feel free to continue the conversation over on the new Stimulus Discourse.