Hi all! I have deployed my Solidus Store in <Railw...
# support
b
Hi all! I have deployed my Solidus Store in Railway.app. It works fine. But I have a little question. How can I create an admin user? I know that the default admin user is admin@example.com with password; test123. I have created but it does not work. In the deployment process I have not received the question to create the admin role unlike in the local installation. How can I do this? Thanks in advance and sorry for my ignorance. 🤯
1
z
Hi Jules, I managed to find these details by accessing Heroku console and running
Copy code
Spree::User.first
I imagine railway.app has a similar console functionality and so the same process may work for you
b
Hi @Zyad A. Thanks. Yes, Railway.app has the same console. I have found the admin@example.com user in the Railway console but I can not manage the Store backend; "Authorization Failure"
z
Do you mean you can't access the admin section? Perhaps try changing the admin password in the console?
b
I think that the problem is that I has not been prompted in the Railway build installation process for create the admin role. And I dont know how to give the admin role to an user.
z
I'll let someone more experienced support here, but I can just say from my experience deploying, I did not create another admin user but continued with the one from the initial build
k
Hello! SolidusAuthDevise comes with a rake task for that:
bin/rails spree_auth:admin:create
should do the trick. Under the hood, it is executing this file, if you want to take inspiration about how to make a user admin programmatically. Let me know if this helps!
b
Hello @kennyadsl. Thanks. The rake task `spree_authadmincreate`did not work for me, or at least I have not been able to make it work. But in the
users.rb
that you have sent me I have found this...
So I have searched for Spree::Role in your Solidus guides and in https://legacy-guides.solidus.io/developers/users/custom-authentication I have found this...
So, successfully passed test! 😀 Thanks a lot for your help.
🎉 1
Great community. 👍🏻
❤️ 1