Currently, I am looking for a way to perform a single log on feature with other system through API.
The feature logic is when user using other system account to login umbraco cms, backoffice will do the authenticate with calling API. If the username and password are correct and login to cms. There will also check if the user is not exist in cms, it will create new user and login.
I am facing a problem about after create new user, suppose it can be auto login to cms. However, It shows "Login failed for user XXXX" at first time. It can be able to login when I login again.
I am trying many way, eg. OwinStartup / custom member ship provider ... etc. But it does not fix my problem.
namespace bordrin.web
{
public class CustomUmbracoOwinStartup
{
public void Configuration(IAppBuilder app)
{
var applicationContext = ApplicationContext.Current;
app.ConfigureUserManagerForUmbracoBackOffice
Extend Umbraco CMS Login
Currently, I am looking for a way to perform a single log on feature with other system through API.
The feature logic is when user using other system account to login umbraco cms, backoffice will do the authenticate with calling API. If the username and password are correct and login to cms. There will also check if the user is not exist in cms, it will create new user and login.
I am facing a problem about after create new user, suppose it can be auto login to cms. However, It shows "Login failed for user XXXX" at first time. It can be able to login when I login again.
I am trying many way, eg. OwinStartup / custom member ship provider ... etc. But it does not fix my problem.
Any advise?
We have it solved with an OwinStartup, we are using it in a few Umbraco projects and it works great.
But your question is a little to wide to answer I think. What are showing in the logs etc? Can you show some code?
Sorry for late reply.
Here is my code.
[assembly: OwinStartup("CustomUmbracoOwinStartup", typeof(CustomUmbracoOwinStartup))]
namespace bordrin.web { public class CustomUmbracoOwinStartup { public void Configuration(IAppBuilder app) { var applicationContext = ApplicationContext.Current; app.ConfigureUserManagerForUmbracoBackOffice
}
public class CustomBackOfficeUserManager : BackOfficeUserManager { public CustomBackOfficeUserManager(IUserStore
}
Here is the capture at login page.
1 Login > api authentication
2 success > check user > exist > login to cms
2 success > check user > not exist > create user > login to cms
I dont know why first time show error, and backend have created the user. when i click login again, it works fine.
is working on a reply...