![]() ![]() ![]() If he is present in the database, he is granted ROLE_USER when he logs in through Google or Facebook. So, for a user who logs in through Google or Facebook is given only ROLE_OAUTH_USER if he is not present in the database. Not be granted all the provileges unless he completes his profile. In this case, even though all the details required for a registered user are not available from Google or Facebook, the user still have all the privileges of ROLE_USER. Then, provide the client_id and client_secret for Facebook and Google in the config.yml file config.ymlįacebook_login : pattern : /login/check-facebook google_login : pattern : /login/check-googleĬhecking whether the OAuth user exists in the local databaseīy default, a user who logs in through facebook or google is given ROLE_USER, and ROLE_OAUTH_USER. The redirect URL for Facebook is Enter this URL in ‘Site URL’ field and ‘Mobile Site URL ’ field under ‘Website’. Please see the screenshot below.įor Facebook, once you register the app, click on ‘Add platform’ button and register your app as a web app. The response after authenticating the user by the service providers is sent to this URL.įor Google, this redirect URL is This address should be provide against the field labelled ‘Redirect URIs’. In addition to that, we have to provide a redirect URL while configuring the app. Security : factories : - "%kernel.root_dir%/./vendor/bundles/HWI/Bundle/OAuthBundle/Resources/config/security_factory.xml"ĥ.Add the resource owners in the config.yml.įor this, we need to register our app in Google and Facebook and obtain the client_id and the client_secret. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |