简体   繁体   中英

TYPO3 callback url, how to make one?

I'm trying to integrate a third party app in TYPO3. This app needs to be authenticated via OAuth. To do this the user is redirected to the app's login, then logs in and then should be redirected (with token data) back to TYPO3.

I have a script that can catch the token data setup in myextension/Resources/Public/Callback.php

However, I need to send the callback url to the third party app when I initiated the authentication process. My question is: what url do I have to supply if I want the callback to go to a script located in myextension/Resources/Public/ ?

Does TYPO3 have methods to generate urls like this? I'd love to hear about the methods. I've been browsing TYPO3 forums for hours, but couldn't get a concrete example nor a working solution.

Thanks!

You should not run a standalone script but pipe it through TYPO3. If you do that, you have database and things available.

Depending on what the callback is used for, an eID might be the best way.

Register it in ext_localconf.php with:

$TYPO3_CONF_VARS['FE']['eID_include']['keyword'] = 'EXT:myExtKey/eID/myScript.php';

The URL of that script is now /index.php?eID=keyword and you can add as many parameters as you wish.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM