Docs Discussion Login Register

Discussion

Start Discussion General Feature Module Dev Theme Dev Installation Hosting

Hi, I have created the social login module in Avored using Socialite package. in order to use Socialite we have to setup config values in config/services.php file

 'twitter' => [
        'client_id'     => env('TWITTER_ID'),
        'client_secret' => env('TWITTER_SECRET'),
        'redirect'      => env('TWITTER_URL'),
    ],

but i want this social login tab enable and reaming information to be setup from configuration tab of admin, can you please suggest how can i achieve this.

Thank you. 

Purvesh 1 year ago

Inside your modules Module.php file Please add this code into your boot method.

$configurationGroup = AdminConfigurationFacade::add('social_login')
->label('Social Login');

$configurationGroup->addConfiguration('social_login_twitter_client_id')
->label('Twitter Client ID')
->type('text')
->name('social_login_twitter_client_id');
$configurationGroup->addConfiguration('social_login_twitter_client_secret')
->label('Twitter Client Secret')
->type('text')
->name('social_login_twitter_client_secret');

yousuf patel 1 year ago

Hi Purvesh,

I have already used above code in my module.php file. I am asking you how to use this code in code in order to show login option in front end view, it if it is enabled.


Please answer to my query.


Thank you.

Purvesh 1 year ago

There is no dynamic way to add your view file or inject an HTML into an avored login view page. I would suggest adding a view file into your module and asked your module user to add this file into the page where they like to display your login options.

For example, I am doing this on review module:

https://github.com/avored/review


Reply
General Feature Module Dev Theme Dev Installation Hosting Save Cancel
© AvoRed 2019 Privacy