hslavich / OneloginSamlBundle

OneLogin SAML Bundle for Symfony
MIT License
149 stars 94 forks source link

insert user after login #117

Closed farestayari closed 2 years ago

farestayari commented 4 years ago

hello @hslavich ,

i have a problem after attempt to log in, it always stuck on /saml/acs and tries to insert the user every single time to the database ,all i want to do is when it find the user it log in without creating a new user everytime , i tried with UserFactory but it didnt solve the problem

lamine78c commented 4 years ago

Hello, I have the same problem. Did you find a solution? Thanks,

a-menshchikov commented 2 years ago

If you use an Entity User Provider, this does not lead to inserting the user to database (but be careful with Symfony\Component\Security\Core\User\UserProviderInterface::refreshUser if your user class repository implements UserProviderInterface and be careful twice if not).

Now this bundle will try to insert the user to the database only if you setting up the user persistence.

A new user instance is created by the UserFactory in a case when UserNotFoundException is catched during the user loading from UserProvider. If there is no UserFactory the exception will be thrown further.


I close this issue now, but anyone can reopen it if need.