symfony: sfDoctrineGuardPlugin: doesn't redirect to the referer page - symfony1

I have just crate a new sf 1.3 project, installed sfDGP and activated the security on my web app so when i write an URL the authentication form appears.
The problem: after logging the web app is not redirected to the referrer
URL but to the root URL.
These are my steps:
I call the URL "http://rs3.localhost/frontend_dev.php/usuario"
The auth form appears.
If i write var_dump($user->getReferer($request->getReferer())); inside
the signin action this is showed:
"http://rs3.localhost/frontend_dev.php/"
Any idea?
Regards
Javi

Related

Verify email on appwrite (my docker container) without mobile

var result = await account.createVerification (url:'http://192.168.20.49:81/v1/account/verfication' );
sends a link to the mail
(http://192.168.20.49:81/v1/account/verfication?userId=63972f2f56d0c39fc9f8&secret=5025d...a&expire=2022-12-20+12%3A08%3A11.784)
Redirects to the browser and in the browser window json
{"$id":"6396bde6604188965bab","$createdAt":"2022-12-12T05:36:38.796+00:00","$updatedAt":"2022-12-12T15:44:11.741+00:00","name":"Andrey","registration":"2022-12-12T05:36:38.795+00:00","status":true,"passwordUpdate":"2022-12-12T15:44:11.741+00:00","email":"andrey253#yandex.ru","phone":"","emailVerification":true,"phoneVerification":false,"prefs":{}}
how to make sure that mail on the site is verified without redirection to the mobile? Can I create a page on the site for verification? And why verification does not happen automatically when clicking on the link, it would be very convenient!
For me a problem to receive in the userId and secret application in flutter from url http://192.168.20.49:81/v1/account/verfication? userId=63972f2f56d0c39fc9f8&secret=3ab63c4dee.41&expire=2022-12-20+19%3A42%3A10.896.
Instead of passing http://192.168.20.49:81/v1/account/verfication, you'll need to pass a URL to some page or something that will receive the secret so you can make the update verification API call. You can either host a web page to do it or set up a universal link that will link the user into your app where you can handle it in your app.

angular Microsoft authentication library issue

I am using MICROSOFT AUTHENTICATION LIBRARY in our angular 10 project. I have used MSAL loginPopup() function to login the user in our active directory. But sometimes When I click the login function msal login pop appear and when I close the parent window it does not redirect in the next page stuck there and on the browser debugger console window it shows this error
(ERROR BrowserAuthError: hash_empty_error: Hash value cannot be processed because it is empty. Please verify that your redirect URI is not clearing the hash. Given Url:)
What worked for me in my ReactJS application was to set the redirectUri to a blank page or a page that does not implement MSAL. If your application is only using popup and silent APIs you can set this on the PublicClientApplication config like below:
export const msalConfig = {
auth: {
clientId: process.env.REACT_APP_CLIENTID,
authority: `https://login.microsoftonline.com/${process.env.REACT_APP_TENANTID}`,
redirectUri: 'http://localhost:3000/blank.html'
},
cache: {
cacheLocation: "localStorage"
}
}
If your application also needs to support redirect APIs you can set the redirectUri on a per request basis:
msalInstance.loginPopup({
redirectUri: "http://localhost:3000/blank.html"
})
After some research I found out that the problem was related to the redirect Uri, and most resources pointed to adding a blank page as the redirect Uri in a popup flow. However most of the answers were related to React. I tried a few options for adding a blank html page but it was not so simple. I did not want to waste much time on this issue, because the app is new and we might go with the redirect flow in the future.
Then I remembered that the problems started when we configured the home page, which is the redirect target, to be authenticated with MSAL Guard.
Since I couldn`t easily add a blank html page, I added a blank-page component configured in the Router with blank-page path. The component had no functionality and was not related to MSAL, MSAL Guard or MSAL Interceptor.
This solved it for me. I hope this helps.

iOS redirect to specific password reset page?

We've had the following iOS message appear when logging in to our website:
Is there a file we can place into our website's root folder to tell iOS to redirect to the following exact URL rather than just our homepage when a user taps on Change Password on Website?
www.example.com/pages/reset-password/
One way to do it is by setting up a /.well-known/change-password redirect on your server to your actual password reset page.
Using your example, create a redirect from https://www.example.com/.well-known/change-password to https://www.example.com/pages/reset-password/ That's it. For the redirection, use the HTTP status code 302 Found, 303 See Other or 307 Temporary Redirect.
Alternatively, you could serve an HTML page at /.well-known/change-password with a <meta> tag using an http-equiv="refresh".
<meta http-equiv="refresh" content="0;url=https://www.example.com/pages/reset-password/">
The redirect is supported in Safari and Chromium-based browsers, and there's a W3C spec that defines the behavior. More details in https://web.dev/change-password-url/

What redirect URL to use when logging in with GitHUB with OAuth2?

I'm new in ios sdk and English. Therefore, sorry for my Eng.
I try to do authentication through github using OAuthSwift.
In the registration of the application (https://github.com/settings/apps), there is need a redirect URL. In the tutorial from raywenderlich.com was an example, they did authorization through Google. They wrote a unique domain in this line that does not work: com.raywenderlich.Incognito. And in Info.plist, we added a Scheme URL with com.raywenderlich.Incognito, so that (as I understood it) when we go to this address after authentication, we’ve got into our application. But if you try to add in the application settings (https://github.com/settings/apps) the Redirect URL: something like com.raywenderlich.Incognito, will generate an error, because github wants the URL to have to be valid. If we put the Valid URL there, then when we will be redirected to this address, we will simply go to it and will not return to the application.
I would be grateful for any help.
Sorry for my English.
Redirect url in OAuth is the url that the authentication provider navigates to when authentication is successful.
For mobile apps it is the link that launches the app (a sort of deep linking)
For websites it is the website home screen

Twitter Oauth callback to www subdomain within same domain

I'm using ASP.NET MVC 3 and TweetSharp. I'm open authorization dialog with window.open(), at the end of auth program in this window tries to access to main window through window.opener.
In my application callback set to http://www.domain.com and when i'm open site from that url everything works fine, but if use just domain.com i get an error something like "Acces is denided because of different domains" when window.opener is accessed.
I have tried to set callbackUrl when app auth dialog opens, but this has no effect. Also changing callback url to http://domain.com give same result.
Only way to solve this is to use UrlRewrite to always redirect on www.domain.com. Or i'm missing something and there is another way?
Thanks.
Log in to your Twitter Dev Account (dev.twitter.com), select the appropriate Twitter Application, go to the tab "#Anywhere domains" and add www.domain.com as authorized...
works for me
i did not work with tweeter but i work with facebook the same problem are there that is why i put the canvas url there with my domain url try to put your call back url as your domain url
or try some thing like this in java script :
var url = window.location;
url = url.toString();
url = url.replace(/www.domain.com/,"domain.dev.domain.com")
window.location = url;

Resources