KO3 Auth module - Subdomains - kohana

I use Auth module, but it works only for a subdomain, where I am logging in.. For example, my login page is on www.domain.tld, and after login, there is always logged user. But on subdomain.domain.tld, there is not. I changed property domain in Kohana_Cookie to .domain.tld, but without effect..
Could you help me?

Try adding ini_set('session.cookie_domain', '.domain.tld'); to bootstrap.php.

Related

redirect URI is not registered properly with DocuSign

i am running the DOCUSIGN example code "eg-03-node-auth-code-grant" to check how embedded signing works(at https://localhost:5000). So after the signing is complete i would want it to return to another app. I have my other app running at localhost:8080.
In the Docusign developer sandbox account, i have added "https://localhost:8080/ds/callback" in the list of redirect URLs.
When i test the embedded signing code now, it gives me an error saying "Redirect URI is not registered properly with docusign"
What I ideally want is to build a separate docusign app for a consent process. once the consent is done, it goes to my other application to complete the rest of the study. For now, i was testing out with the example code it it redirects to another app but it doesnt. Am I missing something? other than registering the redirect URI in the integration key page, is there any change i need to make in the demo code for embedded signing to make it work?
As said in support : "There are two primary causes of this error, either an incorrect URI is being passed to DocuSign, or a correct URI has not been registered for the integration key."
I had the same problem, so i realized that appUrl was http://localhost:8080/ds/callback, but should be http:localhost:8080.
So you have to add too a Redirect URI of http://localhost:8080/ds/callback to your Integration Key in your eSignature Admin.
I hope i was clear and sorry for my bad english.
It's possible you're using incorrect environment, use account-d.docusign.com for Demo and account.docusign.com for Production when requesting for authorization code grant.
could this be https vs. http situation?
are you running it on your local at https://localhost:8080/ds/callback or http://localhost:8080/ds/callback? please check. It has to match exactly the same
Another thing to check is the use of trailing slashes in app_url. While my case related to the PHP Quickstart, it's possible this affects the others as well.
My Quickstart application was installed to a subdirectory, at https://example.com/docusign/public/. So the redirect URI was set in the DocuSign dashboard as https://example.com/docusign/public/index.php?page=ds_callback - which is correct but I was still getting the "not registered properly" error.
It turns out that the app_url in /docusign/ds_config.php must not have a trailing slash, so
'app_url' => 'https://example.com/docusign/public', // The url of the application.
works but
'app_url' => 'https://example.com/docusign/public/', // The url of the application.
fails with this error.
You just need to add http://localhost:8080/login like the redirect URI in Docusign and you won't see the error message "The redirect URI is not registered properly with DocuSign" again. It's working for me.
you also need to add a redirect URI for each scenario as in: https://localhost:8080/ds/callback,
https://localhost:8080/ds/callback#/username,
https://localhost:8080/ds/callback#/password
Make sure the protocols are also the same
In ds_config.php there is a comment under app_url saying
// Ie, the user enters app_url in their browser to bring up the app's home page
// Eg http://localhost/code-examples-php/public (no trailing slash) if the app is installed in a
// development directory that is accessible via web server.
// NOTE => You must add a Redirect URI of app_url/index.php?page=ds_callback to your Integration Key.
So try adding this to your Integration Key -> Redirect URI, In my case I'm using port 8080.
http://localhost:8080/public/index.php?page=ds_callback
This works for me.

Azure AD Logout Url - Redirect not working

I'm using Azure AD to authenticate users into a ColdFusion web application. All works great, except when I log the user out I want to redirect them back to a page in my application. The logout works correctly as far as clearing the cookies, etc, but the redirect is not happening.
I'm using the following format on my URL for logging out
https://login.microsoftonline.com/<tenant id>/oauth2/logout?&client_id=MY_CLIENT_ID&post_logout_redirect_uri=https://myredirecturl
If I do not supply a valid URI, it gives me a error message stating that 'post_logout_redirect_uri' value must be a valid absolute Uri.. So I know it's seeing the URL parameter properly, but it is just NOT redirecting.
Anyone have any suggestions?
Thank you!
A few things to try:
Try using a different browser. That could indicate a browser-specific JavaScript issue.
Try URL encoding the URL that you're redirecting to.
Make sure the URL you are redirecting to is in the same domain as your web app.
Also, I noticed your logout URL is a little funny: you have both a "?" followed by a "&" before your client_id query string parameter. I suggest you remove the "&" and have your URL look like .../oauth2/logout?client_id=...&post_logout_redirect_uri=...

IIS forms authentication cross domain not redirecting to correct domain

I have 2 sites running on one instance of IIS 7.
A.site.com
B.site.com
These sites use forms authentication and there is one form for logging in on site A.
So if i try to access a restricted page on site B with URL
B.site.com/TEST/
i get redirected to
A.site.com/login.aspx?ReturnUrl=%2TEST%2f
I can then enter username and password to authenticate. So far so good.
After authentication I get redirected to
A.site.com/TEST/
instead of
B.site.com/TEST/.
Can anyone tell me how i can get around this problem and make IIS redirect me to the correct page?
Note: the authentication works fine - i can go to the page B.site.com/TEST/ and i am no longer redirected to the login page. So the problem is just redirecting to the wrong site or the value of ReturnUrl should not be a relative path.
A workaround might be to force the user to go back to the last page using JS instead. Not a great answer though i admit. I think this is an IIS bug since the documentation to set up forms authentication with different sub-domains does not mention this problem at all.
EDIT:
A better answer is change the loginUrl to include the domain.
loginUrl="https://A.site.com/Login.aspx?domain=B.site.com"
Then handle the redirect client side

Spotify Web API Redirect Issue

I have set my redirect uri to something like this:
../index.php?r=spotifycollegeplaylists/tab/index
I was able to setup the login using this example
https://github.com/jwilsson/spotify-web-api-php
The login is working fine, I can trigger the login popup and I am able to login. Now the problem is with the redirection. After logging in I am redirected to this URL:
../index.php%3Fr=spotifycollegeplaylists/tab/index&page=index?code=AQCtOWUzHM
See the problem with the redirect is that it has two "?" If i manually change %3F to ? and ?code to &code, the links is working okay.using the method from the API above how will I be able to fix this issue?
I've made a query on the Spotify Web API site as well, and I got a feedback from one of their support team / developer.
"I understand your issue and I would recommend that you don't have any query parameters in your callback URLs. We have a known issue in that we don't allow the Redirect URI to include parameters and hopefully this will be fixed soon. Meanwhile, you could use the state parameter that you'll get back when the code is returned through the callback."

Disable login via wp-login.php but allow through custom login page

I have a free custom login/register sidebar widget and I wants that all users must login or register through this custom login widget. So, I tried to disable wp-login.php by denying IP address except mine via .htaccess.
But, this is not working. When I tried to login (by using proxy) through custom login widget, it simply didn't logged in.
Is there any way to solve this issue?
Many thanks in advance.
Note: This question is related to wordpress login. I tried to search similar question here but found only one without any solution.

Resources