lausd-teacher / gwt-oauth2

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

Need JS code for oauth2 #7

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Which OAuth2 provider or API service?
FACEBOOK,
GOOGLE,

External references, such as API reference guide?
SAME

Please provide any additional information below.
--
Hi, you can send me a sample code that performs authentication using sites like 
Facebook and Google?

Have an example written in JAVA. Samples on:
http://gwt-oauth2.googlecode.com/svn/trunk/samples/multi/demo/Sample.html

I need this example in jQuery/JS language, I'm also using ASP.NET.

Regards,
wizardnet972@gmail.com

Original issue reported on code.google.com by WizardNe...@gmail.com on 31 Aug 2011 at 9:20

GoogleCodeExporter commented 8 years ago
I've got a change in the works to make the necessary functionality available to 
pure JS and to have the GWT compiler package it up as a single JS file. The 
change also includes sample code for calling from JS.

Original comment by jasonhall@google.com on 31 Aug 2011 at 1:34

GoogleCodeExporter commented 8 years ago
Cool. I can not wait:)

I downloaded the files of example, and it works great. 

Is it possible to know whether there is a connection to one of the sites? When 
loading the page?

Something like:

$(function($) {

    var isConnected = auth2plugin.getSessionState();

});

Original comment by WizardNe...@gmail.com on 31 Aug 2011 at 2:20

GoogleCodeExporter commented 8 years ago
There is not currently a way of querying the library for whether or not a token 
is stored for a particular service, though it shouldn't be difficult to add.

Filed as a separate bug: http://code.google.com/p/gwt-oauth2/issues/detail?id=8

Original comment by jasonhall@google.com on 31 Aug 2011 at 3:02

GoogleCodeExporter commented 8 years ago
Fixed in r36

There is now a single JS download that you can use outside of a GWT 
application, that provides all the methods available to the GWT library. You 
can find that script here: 
http://gwt-oauth2.googlecode.com/svn/trunk/script/gwt-oauth2.js

I'll write up a doc about how to use it, or you can check out the sample code: 
http://code.google.com/p/gwt-oauth2/source/browse/trunk/samples/script/ScriptSam
ple.html

Original comment by jasonhall@google.com on 20 Sep 2011 at 4:03