Marvman / gwt-oauth2

Automatically exported from code.google.com/p/gwt-oauth2
Apache License 2.0
0 stars 0 forks source link

Expose login paramaters #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Expose the login parameters so we can 
1) specify [code] as the token so we can pass that to a server side page which 
will get the access token and ID token (crucial if we are going to match the 
user to our user database).
2) allow us to change the redirect_uri to accomplish that.

Please see how MS's LiveConnect and Facebook's javascript libraries do OAuth 
2.0.

WL.Event.subscribe("auth.login", onWLiveLoginComplete);
WL.Event.subscribe("auth.logout", onWLiveLogoutComplete);
WL.init({ client_id: wlive_client_id, redirect_uri: wlive_redirect_uri, scope: 
wlive_scope, status: true, response_type: "code" });

//If the user checked "Remember me" in the last login, Init actually logs the 
user in and raises the callback without displaying the login popup.

//displays the popup on some button click
WL.login();

Original issue reported on code.google.com by cmoya...@gmail.com on 10 Mar 2012 at 2:29

GoogleCodeExporter commented 9 years ago
I support the request to be able to specify our own Redirect URL, if possible.

My issue is I have a GWT app compiled on my machine with ports forwarded such 
that I can use http://publicIP:port to access my app.

Since Windows Live requires a domain name (i.e. it does not accept an ip 
address as the redirect URL), I used a free IP redirection service. Essentially 
myapp.no-ip.com loads myPublicIP:port in a frame. When I click the authenticate 
button on my web app, even though I'm accessing it from the no-ip domain name, 
the redirect URL is still my public IP, resulting in an error.

Original comment by bj.nod...@gmail.com on 13 Apr 2012 at 12:23