Is there a way to detect when the Facebook permissions dialog is shown? - authentication

I'm using the FB Javascript SDK, and handling login via a custom button that calls FB.login. Ideally, I'd like to be able to record some tracking data whenever a user is shown the app approval/permissions dialog so that I can see how many users bomb out at this stage. Unfortunately, I can't seem to find a reliable way of achieving this.
If the user is already logged in to FB, I can infer whether it will be shown by checking the login status before calling FB.login. If the user is not_authorized, then I know the permissions dialog will be shown. But if the user is not logged in, my information is more limited. I can assume that the user was shown the dialog if they finish the process as not_authorized, but if they end up being connected then I have no way of distinguishing between a user who was already connected and one who just gave approval.
I'd hoped that the auth.prompt event might help, but it doesn't seem to be fired for the sequence starting from FB.login. Any suggestions?

Ideally, I'd like to be able to record some tracking data whenever a user is shown the app approval/permissions dialog so that I can see how many users bomb out at this stage.
Look at your app insights, there you’ll see Auth Dialog Conversions.
No need for own tracking for that.

Related

Forgot password in Firebase Authentication (better UI/UX)

I am developing a mobile app which uses Firebase Authentication. When the user forgets his/her password, I am following these steps:
1- User is asked to enter his/her email.
2- User is forwarded to the attached screen (see image).
3- User receives an email with a link.
4- User clicks on the link in the email inside his device.
5- User is taking to another screen (in the mobile) to enter new password.
The problem I am faced with is that what if the user performs step # 4 but on his desktop.
Meaning that the user goes to his desktop and clicks on the link inside the email. In this case, the rest of the steps will resume from the desktop and the mobile app does not know if the user has changed his password. So the mobile app will remain at the attached screen. What should I do to move the user to the sign in screen.
Obviously, I can add a third button which I can call "Continue" or "Resume" which when clicked will take the user to sign in. But that has couple problems:
1- I will need to add a third button to the screen which is not super clean.
2- When the user clicks on the "Continue" or "Resume" button, there is no guarantee that the user has changed his/her password in the first place. So there is no point of clicking the button in the first place.
One other solution would be to not allow the user to change password from the desktop by providing instructions to the user to go back to the mobile device and click on the link in the email over there.
Can some one suggest a nice way to handle this situation.

Vue.js Should you emit data from popup back to the main window?

I and my co-workers can't seem to agree on what the best practice should be when it comes to Vue and popups.
The question is as follows:
You are on the main window, you get the data from the backend using REST API and you notice an error. To fix it, you go to an edit popup and after hitting save what should happen?
Should you call the API from the popup?
Emit the changed data and let the main window call the API?
...
This is very interesting question but I think the truth depends on your whole architecture, implementation and approaches you use.
Say, if you worry about the "separation of concern" you wouldn't give a popup any access to API because its work is to show you some data as a popup, return data, and that's it.
On the other hand, how are you handling errors? What if an error occurs when user works in popup? Where do you show error?
Another question is the usability. For example, if error occurs when you save data, if it's done by the main window, you are going to:
Show the error message
Make user to click some button again to show the popup
Fix a problem and click the Save button in it.
But if you would access API right from popup you would avoid first 2 steps. Another concern is how you handle wrong data.
If you are still in the popup you easily can validate the data and cancel saving (or disable this button at all) but if it's done after the popup is closed it may be too late.

If on URL then message box

So I have this weird problem. I have a WebBrowser starting on the page https://live.xbox.com/en-US/MyXbox/GamerProfile (It is a page for editing information on your account) but whenever it goes there it takes the user to live.com to log in, and then goes back to the page to edit his profile. This is how I want it to function, but I want a message box to display if it takes the user to the page again (to verify he's logged in). This is what I have so far:
If WebBrowser1.Url.OriginalString() = "https://live.xbox.com/en-US/MyXbox/GamerProfile" Then
MessageBox.Show("You are logged in!")
End If
But I never get the message box to show, and I don't think it works :\
Does anyone know why it isn't working?
which part of your application is that code running? I mean, does your program knows when xbox takes the webrowser to the login page and back? If your code only run once when the webbrowser object is created, then this doesn't get run.
EDIT:
In that case, the code should be within the WebBrwoser.DocumentCompleted() event. Take a look at this: http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.documentcompleted.aspx

VB.NET - Log into website with out website open

I want to create a program to fetch information from a website (that's fine). However, you need to be logged in to get this information.
I just want two simple textbox controls that I would type my username and password into and hit submit and the information would be returned to me so I can use it. (I don't want to use a webbrowser control)
Sorry if I wasn't clear
And also
(this really isn't important, but its up to you if you want to answer, it's probably hard)
How would I go about checking if I am still logged into a website or not (as in TRUE or FALSE)
you can pass credentials into a HttpWebRequest object.
You could use a webbrowser control since it is easy, and just set its display to not visible - the user would never see anything. You could still interact with the page just like normal. You could use the same control to log yourself out by clicking on the logout button. You would set everything up and test it with visible=true, and when it all works, set visible to false.

Can't retrieve the session on clicking of browser's back button

I have rails application that calculates prices of goods and I set prices in session. I have 'back' button in my application. When I clicks on 'back' link, I will get my previous session values like 'prices','goods' I purchased.
But when I clicks on 'browsers' back button,I won't get my session values, I have to refresh the page for that.
I'd say you have caching issues... The browser remembers what it saw before, and thinks it's the same (without even going to the trouble to ask the server any more). Try if this article helps
You probably want to prevent the browser from caching your pages so that they get refreshed when the user clicks the Back button. This article should help.