Answer the question
In order to leave comments, you need to log in
Where should I redirect after logging into the service?
I'm studying this bundle: https://github.com/hwi/HWIOAuthBundle
Everything seems to be fine, until the redirect after login.
According to the documentation in security.yml , you need to write the resource_owners path:
I have this:
secured_area:
oauth:
resource_owners:
vkontakte: "/login/check-vkontakte"
login_path: /connect/vkontakte
failure_path: /login
default_target_path: /login
hwi_oauth_redirect:
resource: "@HWIOAuthBundle/Resources/config/routing/redirect.xml"
prefix: /connect
hwi_oauth_login:
resource: "@HWIOAuthBundle/Resources/config/routing/login.xml"
prefix: /login
vkontakte_login:
pattern: /login/check-vkontakte
Answer the question
In order to leave comments, you need to log in
Yes, you have to create a controller that should do something. What exactly he should do is up to you, find the answer to the question "What to show the user after he logs in?". Profile page, news feed, whatever, really. As you answer this question, you will understand which route to prescribe in the configuration.
in order of processing, the existence of the route in the application is first checked, and only then it can already be intercepted on the corresponding event, that is, you need to add an empty route:
my_vm_login:
path: /login/check-vkontakte
A person has a similar problem https://github.com/hwi/HWIOAuthBundle/issues/158
May not have come across yet.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question