Since we will have the user information(Role,name and other information) in our HTTP request object once they will hit the neos/login page
Is there any way to create the user at run time through the program or API in Neos.
As user try to log in, first check if the given credentials is already there in neos, not to be created but if given credentials is new then it should create the user.
Would you please give an idea how we can create on fly as you said it is possible.
The Thing is there is third party authentication provider(SSO
) so user credentials is already checked through their backend and once successfully it redirect to our neos application.
So we would be getting the user information from request object with the role ,on the fly we need to create those user if user comes at very first.(We don’t want to show the neos/login page again to login)
Did you create your own Authentication Provider to authenticate users somewhere else than the Neos user table ?
If yes, that should contain a authenticate() method (defined in the AuthenticationProviderInterface. Have a look at PersistedUsernamePasswordProvider for an example) Inside that authenticate() method is where you want to create and persist your Neos User model.
Look at this Instagram authentication implementation
“Did you create your own Authentication Provider to authenticate users somewhere else than the Neos user table ?” Yes we have third-party authentication provider where user are stored in their LDAP directory(User info like role, name…)
So if the user comes at very first, on fly user has to be created in Neos (after successfully get authenticated through authentication provider.)
Note: “At the very first time, In future since the user is already created, no need to create again and again.”
So I got a bit idea as you have mentioned above but how we would be able to call these above methods.
(how Could directly do and take the user Noes page(don’t want to show Neos login page)
Had to write the code in same PersistedUsernamePasswordProvider where i check first if user is not there ,create the user first and logged into neos
please find below code for same where i have few information in cookies (like first name and last name)