cakephp-opauth icon indicating copy to clipboard operation
cakephp-opauth copied to clipboard

Configurable redirect URL

Open mcallisto opened this issue 11 years ago • 3 comments

Lines 110 and 111 in Controller/OpauthAppController https://github.com/uzyn/cakephp-opauth/blob/master/Controller/OpauthAppController.php#L110

$completeUrl = Configure::read('Opauth._cakephp_plugin_complete_url');
if (empty($completeUrl)) $completeUrl = Router::url('/opauth-complete');

are currently useless.

Is there a way to restore the concept of a configurable URL? I would like to redirect to a HTTPS page (from an HTTP one).

mcallisto avatar Oct 21 '13 22:10 mcallisto

You can simply set Configure::write('Opauth._cakephp_plugin_complete_url', 'https://some-domain/path/to/login') at your main CakePHP's app bootstrap.php.

uzyn avatar Oct 22 '13 09:10 uzyn

Hi Uzyn, thank you for your reply and above all for the good work!

But in the current code Configure::read('Opauth._cakephp_plugin_complete_url') is put in the $completeUrl variable and then that variable is not used for redirection; that is why I was saying those lines are useless.

Can you fix it?

mcallisto avatar Oct 22 '13 18:10 mcallisto

Oh yeah, thanks for the bug report. Will take a look soon.

uzyn avatar Oct 23 '13 01:10 uzyn