AWS Cognito - Login with Facebook on Browser (Not Mobile APP) - amazon-cognito-facebook

We are attempting to implement AWS Cognito instead of Facebook's Login SDK.
The components are
1. Home page acme.com login
1.1 Has Login with FB button
2. Destination page: acme.com profile
scenario A; NO Acme session
a1. User is logged in to Facebook in a browser tab; i.e FB session created and active
a2. Assume User has linked FB id to Acme's FB Login App
a3. User opens new tab acme.com login
a4. Clicks login with FB >
a5. FB login window pops up - [see][1]
a6. User's Login session via Acme's FB App ID is created
a7. user is redirected to Home page
Scenario B:
User closes Acme.com tab (does not log out) and reopens new Acme.com tab
Expected behaviour
b1. Page loads
b2. User's FB Session (Via Acme's FB Login App ) is recognized
b3. User is logged into Acme and navigates to home page
Problem
We are noticing that in Scenario B
The user is not automatically redirected from b1 to b3
The user is required to click on login with FB page to proceed.
Any working examples?
Reference site expedia : . try logging with FB, and closing tab (do no logout of Expedia, browser and opening a new browser session and reloading expedia.com

Related

How to avoid page refreshing when i click the back button

Am using struts2 to create login and logout functionality, when user login i will create the session for him,by using interceptor i will filter all users if they are in session or not if the session not created i will redirect the page to login........my problem is once i done logout that will redirect to the login page but when user click browser back button the page will get refreshed and again that will login ,,,,,,could anybody help me out from this problem
Thanks in advance
When you click "<-" button on browser the browser renders the page from its cache. So server does not know if you have click back button. In your case when user clicks back button, page is loaded from cache but it does not mean that session is again created for that user as logged in. When user will click on any authorized link on that page, your server side code will check that user has no valid session and login page will be returned.
Solution: However if you do not want user to get cached page then you can load a script say checkLogin.js for every page in your site. This script should be executed on load event of the pages. When user logs out, set a variable in cookie indicating that user has logged out. When user clicks back button then that script will be executed. That script will check, using the mentioned cookie variable, if user has logged out. If user had logged out then redirect to login page using javascript.
To avoid that refreshing i have redirect my page to menu after loginsuccess not forward i have escaped from that ghost problem
use like this in ur struts.xml
<result name= success" type="redirect">Menu.jsp</result>
thanks for all

Bypass log-in screen after redirection MVC

I'm stuck with a problem right now. I have 4 websites each of which has a log-in screen.
Now here are the coditions before a user can log-in the these websites:
Website #1: Username must start with AB
Website #2: Username must start with BB
Website #3: Username must start with CB
Website #4: Username must start with DB
In each website, after the user supplies the correct username format and the corresponding password, he will be redirected to Account Information page.
What I want to do now is to handle this scenario:
If user is in Website #1, but he entered a user name beginning with CB, I want him to be redirected to Website #3's Account information page, and bypass the log-in page of website #3.
My current implementation redirects correctly, but to the log-in page of the website.
Even just a logical explanation on how to do it would be greatly appreciated.

Check User is Logged in or Nor in Web Browser Control

I m trying to make one test app in windows phone 7.1 And I am using webBrowser control in my app and giving url of external website. User input login details in that form and press submit button. How I Can know the user is logged in.
Thanks,
You can track the URL the user is being redirected to, using the WebBrowser.Navigating event. Check the NavigatingEventArgs.Uri property.
Then you just need to work out the page that the login page redirects to, and if the user is navigating to that then they have successfully logged in.

Facebook sharer not sharing if user session is not alive

I am using facebook sharer in our application. But in my implementation if the user is not logged already(facebook session is not alive) then it is being redirected to facebook login page. After login, the home page is being displayed but not the sharing confirmation page to proceed sharing. If the user session is active it is showing share screen so that user can share the page. To make this work fine when user Facebook session is not alive, do I need to add any parameter or something?
My code will look like :
<a target="_blank" href="http://www.facebook.com/sharer.php?u=URL&t=TITLE">Share this</a>
Thanks
Sreeni.

Get ID of currently logged in FB user

I've created an app in FB, i've set a path of page as its canvas page,users on my website can invite their facebook friends,friends gets notification for invite when they click on notification they are redirecting to my website, on page(ie one i've mentioned in canvas page) i am redirecting user to my website using this
window.top.location.href='mywebsite'
Now i want that when friend click on the notfication i get the facebook ID of that friend.
Is this possible?How can i get the ID of that friend?
No, you need the user who accepts the request to authorise your app before you can determine their user ID

Resources