How to use hybridauth plugin with CakePHP 3.x?

后端 未结 3 1940
悲&欢浪女
悲&欢浪女 2021-01-16 00:21

I use CakePHP 3.x to create a page can make a social sign in. I found HybridAuth plugin can do that. But, I can\'t understand about configuration and flow.

3条回答
  •  感动是毒
    2021-01-16 01:14

    i got error with these code and i repaired it with: error: Hybriauth config does not exist on the given path.

    solution: in users controller where you call(require) config.php

    require_once(ROOT . DS . 'vendor' . DS . 'hybridauth' . DS . 'hybridauth' . DS . 'hybridauth' . DS . 'config.php');
    

    you need to store that what you require in variable $config:

    $config = require_once(ROOT . DS . 'vendor' . DS . 'hybridauth' . DS . 'hybridauth' . DS . 'hybridauth' . DS . 'config.php');
    

提交回复
热议问题