Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ckfinder in iframe - attach token #25

Open
svkmedia opened this issue Aug 23, 2019 · 3 comments
Open

ckfinder in iframe - attach token #25

svkmedia opened this issue Aug 23, 2019 · 3 comments

Comments

@svkmedia
Copy link

I'm trying to open CKFinder in iframe. Problem is that I have middleware checking routes for browser and connector.
When I hit example.com/ckfinder/browser?token=123 everything works fine.
But when I pass exactly the same URL into iframe I get response: Please attach your Bearer token. I updated setup.php in vendor package like this:

CKFinder.config( { connectorPath: <?php echo json_encode(route('ckfinder_connector')) ?>, pass: 'token', token: '<?php echo (isset($_GET['token'])) ? $_GET['token'] : "" ?>', } );

but still not working...
Any advice how to make it work in iframe?

@zaak
Copy link
Member

zaak commented Aug 23, 2019

Hi @svkmedia! Could you please clarify what do you mean by opening in an iframe? What error exactly do you use? Do you create the iframe yourself, or you use the widget mode?

If you use CKFinder inside a custom iframe element it may be a bit tricky to make CKFinder work properly because of cross-window communication restrictions. I suggest trying the widget mode instead - in this mode, CKFinder creates the iframe itself, so everything should work properly.

@svkmedia
Copy link
Author

@zaak yes I create iframe manually. I was thinking about using widget but I have no idea how to use it because I'm trying to implement it into Vue/Laravel app.
I succesfully integrated ekeditor with ckfinder. Now I need button in app navigation to open iframe/widget of ckfinder.
Can I change browser.php and setup.php in vendor package? I'm afraid it will affect ckeditor finder...

@d4rkr3pt0r
Copy link

@svkmedia
Here you can find all you need :
#37 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants