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

Cms that you use #9

Open
popouille opened this issue May 2, 2018 · 3 comments
Open

Cms that you use #9

popouille opened this issue May 2, 2018 · 3 comments

Comments

@popouille
Copy link

Can we know what cms do you use?

I want to test your kutr integration.

Thank you

@X-Ryl669
Copy link
Owner

X-Ryl669 commented May 3, 2018

I'm using my own CMS. Basically, it's using its own domain name and cookies to set up its own session so care must be taken when creating Kutr's JWT Token.
What is your CMS ?

@popouille
Copy link
Author

i tried to integrate with a laravel cms wich works with Sentinel.
i placed my cms_login.php in the public folder.

Then i call Sentinel:

use Sentinel;

Then bootstrap:

require_once("/../***/bootstrap/autoload.php");

about checking the session, i don't know how to do it, maybe a simple:

if Sentinel::check { }

Then i get the current user username:

$login = Sentinel::getUser()->username;

I set the secret key.

But when i visit mycmsdomain.com/cms_login.php , i just get a blank page.

@X-Ryl669
Copy link
Owner

X-Ryl669 commented May 6, 2018

What is the page you're landing on when login on your CMS ?
The cms_login.php page is a hook, it doesn't emit anything, it's just here to create a token that's consumed by your Kutr installation's mlogin.php. If the token is valid, mlogin.php will create the required token for the Kutr's instance.
So, the idea of the cms_login is to ensure your CMS's session is valid, and if it is, then it's creating a token and likely redirect the user to your Kutr's subdomain.

From what you've written above, if Sentinel::checkpart is not valid PHP.
What is the output of the PHP/nginx/apache error log ?

cms_login.php should redirect your user to music.domain.com/loginRedir.php, if it does not, then you have an error before that line.

For debugging purpose, you can add a var_dump(makeToken()); exit(0); before the last header(...) line to check if a token is correctly generated.

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

2 participants