T
T
Toshi Young2018-08-02 17:28:51
Yii
Toshi Young, 2018-08-02 17:28:51

How to set clientId and clientSecret parameters in controller?

I am using Yii2 AuthClient. Is it possible, and how to do it, to configure client parameters inside the controller, and not in the config?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mykola, 2018-08-02
@Toshi

Yii::$app->get('authClientCollection')->setClients([
            'google' => [
                'class' => 'yii\authclient\clients\Google',
                'clientId' => 'google_client_id',
                'clientSecret' => 'google_client_secret',
            ],
        ]);

something like this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question