UIWebview Facebook Connect - uiwebview

Inside a UIWebView the user can click on FB connect button the page displays and when I hit login the UIWebView turns blank and stops there.
On a regular browser after the login is hit, it looks like it goes on fb and redirects back to the webite. I'm not sure what to change on the UIWebView so that it handles it like Safari does
edit:So when I try it on the simulator's safari, hitting the FB Connect button, it opens a new page that shows the login form and then it closes and goes back to the first page after hitting login. SO i guess the question: Is there a way for UIwebView to handle this?

The real problem was using the regular facebook login as opposed to the m.facebook.com login.
Which avoids creating a pop up.

Related

Browser back button is not working in Blazor web-server

I want to go previous page when the user clicks on the browser back button. When I navigate another page, I can not go to the last page by using the browser back button. So, can anyone help me find a solution to this problem?
Ensure that every state that you want to show up in next/back is differentiated by a route change navigated to by NavigationManager.
If you make a page /somePage and you let the user step through several choices, and then the user navigates (using the URL bar) then hits the back button on the browser, they will go back to /somePage and not back to the choices they made.
If you make a page /somePage and each time the user makes a choice they are navigated to a new page using NavigationManager, for example /somePage/someSelection, then when they hit back they will go back to /somePage/someSelection. This requires you to load data on subpage choices on init based on optional page route parameters, but the tradeoff is having browser navigations that are part of next/back.

Google OAuth not working when a user clicks from a LinkedIn link

When a user clicks a link to my site inside their LinkedIn app it doesn't take them to Safari or Chrome, it keeps them in an internal LinkedIn browser.
If the user then tries to create an account via Google OAuth they get the following error (see image).
Is there a way to prevent LinkedIn from opening a link in their proprietary browser, and take them to Safari or Chrome automatically? Or another workaround for this issue?
Neither you can restrict LinkedIn to open your site in other browser nor to stop google to throw the error. To solve this problem, You have to write a script which will open your website in the default browser of the user's device. Whenever user hit your website then check the web browser if it's chrome, safari or any other web browser then continue the request else force the user to open website in user's default browser using the script. That's it.
Hope this suggestion will help you.

Facebook 'Continue' button misplaced in Chrome Extension oauth popup

I'm using chrome.identity.launchWebAuthFlow to start the login flow and when the user oauths with Facebook, the bottom 'Continue' button is partially out of the view. When the user has to enter an email and password for the first time, it's fine, but when Facebook asks only for the password the next time, the issue occurs. Also on the 'Forgotten you password?' page.
Since chrome.identity.launchWebAuthFlow doesn't allow to set size, and resizing the window manually moves the button, but at the same misplaced position, I see it as a clear sign that it's Facebook's code or the chrome.identity.launchWebAuthFlow's window's quirk.
When opening up the same auth url in a real browser window, the button is placed at the right place.
Anyone else came across this issue? Is there any good workaround?

Redirect to login page on commandButton press if session is invalid

Brief: How can i redirect to the login page when commandButton is pressed and the user is not logged in anymore?
In detail:
I am trying to solve the following scenario in my primefaces application:
I successfully log in in my web application
I open a new tab while logged in.
Now i log out from the second tab that i opened on step 2. In this tab i get redirected to the login page
Press a commandButton from the 1st tab that still looks like if the
user logged in but not many things happen .
When trying to access a page through a link while logged out, then yes i am redirected to the login page. The same does not happen though with the commandButton component.
I am using a filter already and tried to catch that case, meaning to confirm if on button press the session is null to redirect me to login page.
As seen here: https://stackoverflow.com/a/1027592/1918516
The problem is that even though i logged out from the 2nd tab, and press a button from the 1st tab, my session is never null.
Update: After logging out and invalidate the session with invalidateSession() i see that my session is null. But when press on a button from the first tab, the session is NOT null. Could this be that the browsers cache is somehow maintaining an invalid session ?
Also i want to note here that i am retrieving the session with request.getSession(false)

Browser back button navigation

Whenever browser back is clicked, it must not navigate to the previous page but to some default page. how is it done using JSF ?
Clicking on browser back button requests the result page from the browser cache.
This is a client side activity. It doesn't send request to your server for fetching some default page(in your case).
Please refer this post for writing a filter indicating the browser not to cache dynamic JSF pages.
And also you can refer this one for more details.
You can try to detect if User has clicked on browser back button by writing client side code.
Refer this post for detecting back button click.
If you are trying to alter the behaviour of browser back button, it indicates some kind of flaw in your application.

Resources