0

I wonder if there is a way to put even the propio security.yml file, something like:

web:
        pattern:    ^/web
        oauth:
            resource_owners:
                facebook:   "/web/login/check-facebook"
                google:     "/web/login/check-google"
                linkedin:   "/web/login/check-linkedin"
            login_path: /
            failure_path: /
            default_target_path: /
            check_path: /web/login_check

likewise having login_path: / have something to login_sucess_path?

Marcius Leandro
  • 775
  • 1
  • 11
  • 34

2 Answers2

1
hwi_oauth_connect_service:
    pattern: /service/{service}
    defaults: { _controller: DelivveWebBundle:Default:connectService}

currently I rewrote this route

and I have the following method in my controller

public function connectServiceAction() #(Request $request, $service)
    {
        $user = $this->container->get('security.context')->getToken()->getUser();
        return $this->container->get('templating')->renderResponse('default/index.html.twig');

    }
Marcius Leandro
  • 775
  • 1
  • 11
  • 34
0

Read the documentation.

Starting from line 128 it gives the parameters for redirection after logging in, namely:

# login success redirecting options (read further below)
always_use_default_target_path: false
default_target_path:            /
target_path_parameter:          _target_path
use_referer:                    false

# login failure redirecting options (read further below)
failure_path:    /foo
failure_forward: false
failure_path_parameter: _failure_path
failure_handler: some.service.id
success_handler: some.service.id

So yes, it does have something similar to login_success_path, namely default_target_path.

FWDekker
  • 1,823
  • 2
  • 20
  • 26
  • Then I saw something, but it seems to me it's more when I'm using a form, as in my case I have a link that I got me going by controller requests the bundle – Marcius Leandro Jul 20 '15 at 20:34