korotovsky / SingleSignOnServiceProviderBundle

Single Sign On bundle for Symfony2 projects. SP part.
MIT License
33 stars 18 forks source link

Configuration Exception #16

Open igor-tvardyi opened 5 years ago

igor-tvardyi commented 5 years ago

I got InvalidConfigurationException Invalid firewall "main": user provider "main" not found.

Because of

main: pattern: ^/ security: true sso: require_previous_session: false provider: main

Symfony 3.4.22

korotovsky commented 5 years ago

Hi,

Could you please show configuration of the user providers?

igor-tvardyi commented 5 years ago

I just started new project and there: # https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded providers: in_memory: memory: ~ # fos_userbundle: # id: fos_user.user_provider.username

PS. I've changed main to in_memory

igor-tvardyi commented 5 years ago

And one more question: I have 3 projects and each of them has OAuth for api and standard auth for Web. Is your system applicable to manage SSO in this case? Thank you in advance.

korotovsky commented 5 years ago

We used this bundle in the configuration of the main IdP + 4 SP. In theory on IdP you could have OAuth (social auth) and then behind have this SSO as IdP. For API we had a customized providers so it can not really automatically handle tokens.

But in the end either you invent almost the same bundle or spend fair amount of time for debugging and integrating for your particular use-case and re-use most of the components.