How can I implement OAuth authorization button like Quora's one?
-
Hello, I'd like to implement an OAuth2 authorization process in my web app just like Quora's. I mean: 1. In the login page, add a button to Authorize the app using a Google Account (Twitter, Facebook... doesn't matter) 2. When the button is pressed, new window is opened, that allows the user to authorize the app to use its data 3.- If the user authorizes the app, that new window is closed and the caller window (Quora home) is reloaded. Now, the user is logged in Quora, and can see his/her Quora home page. I'm stucked in the third step. I don't know how to close the new window and reload the caller, after OAuth process finishes. In my app, the new window shows the app when the user authorizes it (fallbacks to callback url). But I want that window closed and the caller one reloaded. I guess is a question of Javascript... Any clues? Many thanks in advance
-
Answer:
I can provide my solution in the meantime while you are waiting for a more exact answer. Have you ever checked out https://oauth.io/? I find it simple to use. Plus it does what you want, in particular the new window is closed as soon as users authorize your app. It also takes care of the redirect url for you too which is nice.
Viriya Ratanasangpunth at Quora Visit the source
Related Q & A:
- How can I implement an atomic incr and decr on top of an eventually consistent key-value store?Best solution by Stack Overflow
- How can I implement idle timeout in android?Best solution by Stack Overflow
- How can I implement a multilayer social network in R?Best solution by Computational Science
- How can I get the Autofill button back on my toolbar?Best solution by Yahoo! Answers
- How can i make an animated gif like this?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.