shopify_app with devise

NileshAjwelkar
Shopify Partner
2 0 0

Hi,

 

We have developed a shopify embedded app, which allows the shopify merchant to install our public app on the store. We have used shopify_app with ruby on rails.

 

We wish to leverage this application and build a admin interface which will allow the admins of the embedded app to log in using email and password, and manage the merchants using who have installed the public app and are using our service. We are using 'devise' gem to handle user sign in, but somehow it does not work. The "current_user" is always nil after logging in. I am not able to figure out the issue. Any help is appreciated.

 

Thanks,

Nilesh Ajwelkar

0 Likes
SBD_
Shopify Staff
Shopify Staff
1044 141 185

Hey @NileshAjwelkar,

 

The admins, are they logging in via a different path to merchants? E.g. /admin

Have you created the admin users and set up the :authenticate_user! helper?

 

 

0 Likes
NileshAjwelkar
Shopify Partner
2 0 0

Hi @SBD_ ,

 

Thank you for the response.

 

Yes. We have a different url "/admin" setup for admin section.

We are allowing admins to signup via "/admin/sign_in".

 

Also, I have a different model "Users" setup for the same.

And, I have all the other things setup as per "devise".

 

Thanks,

Nilesh Ajwelkar

0 Likes
SBD_
Shopify Staff
Shopify Staff
1044 141 185

Interesting. I'm not sure there's much more debugging I can do from this end. Maybe try stripping the app back to just the devise functionality and then slowly work forward to see where it breaks.

0 Likes
FeSens
Tourist
5 0 0

Hello I'm facing the same problem as you. Did you have any advances or tips to share?

0 Likes