Michael Hemmelgarn
Michael Hemmelgarn

Reputation: 71

How to view email/username in devise session controller

I am attempting to create dual authentication using firebase and devise for ruby on rails. I already have the devise session controller extended and I am accessing firebase. It is based on whitelisted locations. (Probably not very secure but its mostly for a fun proof of concept project.) I want to get the username/email from the devise login page so i can find that user in the firebase database to look for the params associated with that name. I have already tried to look through documentation but i might have missed something. If anyone could tell me how to grab the username in the deviseSessions_controller. I would be grateful.

Thank you ahead of time.

Upvotes: 0

Views: 170

Answers (1)

Michael Hemmelgarn
Michael Hemmelgarn

Reputation: 71

It turns out that its accesable through params. Didn't realize this earlier.

params[:user][:email] got me my email.

Upvotes: 2

Related Questions