mikker / passwordless

πŸ— Authentication for your Rails app without the icky-ness of passwords
MIT License
1.27k stars 88 forks source link

current_user action controller #204

Closed nasserfq closed 8 months ago

nasserfq commented 8 months ago

Hello everyone! I've followed the instructions and placed 'current_user' action controller in application_controller.rb. The gem functions correctly, but the problem is that it invokes 'current_user' when the app initially starts running instead of the index action. Should I use filters in application_controller.rb or what? Note: I am still learning Rails and relying heavily on AI for solutions or guidance. Thank you!

mikker commented 8 months ago

Hi! Please provide relevant parts of the code you already have. Much easier to help you if we can see what you're trying 😊

nasserfq commented 8 months ago

image

I was wondering why current_user invoked in the initial app request even though it's not needed --> this's what I thought. But someone told me it's needed to be invoked to determine if a visitor logged in or not! Now I get the logic behind it! Finally, Thank you for building and providing this great gem ☺️

mikker commented 8 months ago

Glad you worked out your problem 😊