3

As I am currently working in a local development environment, I would like to change the redirect URI that the HWIOAuthBundle sends to any provider (e.g., Facebook). My aim is to use a service such as lvh.me or noip.com for the redirection back to my machine.

Is there a paarmeter that can be set to make that change?

Example:

Full request URL that my application is currently generating:

https://www.facebook.com/dialog/oauth?response_type=code&client_id=123456&scope=email&redirect_uri=http%3A%2F%2F**localhost**%2Fmyproject%2Fweb%2Fapp_dev.php%2Foauth%2Fcheck-facebook

I would like to change the redirect_uri parameter to something like

...&redirect_uri=http%3A%2F%2Flvh.me%2Fmyproject%2Fweb%2Fapp_dev.php%2Foauth%2Fcheck-facebook

or

...&redirect_uri=http%3A%2F%2Fmyalias.noip.me%2Fmyproject%2Fweb%2Fapp_dev.php%2Foauth%2Fcheck-facebook
matt_jay
  • 1,241
  • 1
  • 15
  • 33

1 Answers1

1

In Security.yml, add the default_failure_path

oauth:
            resource_owners:
                facebook: '/login/check-facebook'
            login_path: /login
            failure_path: /login
            default_target_path: /home

You can configure the default_target_path, to whatever you want

default_target_path: %home%
Arthur BALAGNE
  • 313
  • 1
  • 6
  • 3
    The default_target_path only seems to take effect once the callback to my application has been made. Is that correct? I want to change the full URI in the 'redirect_uri' parameter of my request. I added an example in my original post. – matt_jay Aug 12 '14 at 15:57