is it possible in a Cuba Platform application to completely remove the login page in order to directly access to the home as an anonymous user automatically logged (I need to be called by another application that has its own login)?
Hi All,
probably it’s not be the best way to solve this kind of problems but it works for me, so I share the solution found: I overrode the method ready() into the extended Class for the Login Page Window, ExtAppLoginWindow, and then forcing a login action as below (e.g. using admin/admin credentials): public class ExtAppLoginWindow extends AppLoginWindow { @Inject protected PasswordEncryption passwordEncryption; @Override public void ready() { try {
App.getInstance().getConnection().login(“admin”,passwordEncryption.getPlainHash(“admin”), Locale.ENGLISH);
}catch(Exception ex){
…
}
}
}
Is there a more polite way to approach such a problem?
By setting the [url=https://doc.cuba-platform.com/manual-6.5/manual.html#cuba.anonymousLogin]cuba.anonymousLogin[/url] property you can define a user to be logged in after an application is started.
I've prepared a sample project for you on [url=https://github.com/cuba-labs/skip-login-window]github[/url].
Regards,
Gleb
Very good solution Gled. I have a question related to the subject. Is it possible to have a link in the main window that takes me to the login screen and enter at the admin user area?
I am building an application that lets any user perform tasks anonymously, but I require an area to configure options and enter entities.