0

I am working on a Instagram extension for magento 2x. When i turn off

"Add Secret Key to URLs" to No

than everything fine and Instagram redirect successfully to my Auth Controller But when

"Add Secret Key to URLs" is Yes

Than it redirect to Dashboard because there is no session key in redirect URI. How can i handle this situation for Magento 2x?

asked Jun 16, 2016 at 10:42

2 Answers 2

1

It's not entirely clear where Instagram is getting the URL from for the redirect. But assuming you are doing something along the lines of OAuth and providing a redirect_uri parameter, so long as you generate the redirect_uri you pass correctly (e.g. with $this->getUrl() in a Backend controller), it should include the secret key and thus avoid the problem. If there is some kind of callback to the site from Instagram (as opposed to the customer being redirected) then that's a different problem.

answered Jun 16, 2016 at 11:14
1
  • @perter i am not using OAuth, i am using CURL with instagram developer App, in the App i mention redirect URI for my Auth Controller, without session key it works but problem is if session key enabled in magento and i try any url without key it redirect at dashboard. hope it clear to you? Commented Jun 16, 2016 at 11:39
0

You can use the below variable in your admin controller.

/**
 * Array of actions which can be processed without secret key validation
 *
 * @var array
 */
protected $_publicActions = ['action_name'];
answered Dec 1, 2022 at 13:07

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.