Coder Social home page Coder Social logo

oauth-android's People

Contributors

bumpmann avatar kavaliero avatar thyb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oauth-android's Issues

oauthUser.saveIdentity() does not work

I want to save some custom data for the stormpath user account. As explained in the docs, I have called saveIdentity() of OAuthUser class after setting some data as below:

OAuthUser user = users.getIdentity();
        user.data.put("location", "Pune, India");
        user.data.put("gender", "Male");
        user.saveIdentity(new OAuthUserCallback() {
            @Override
            public void onFinished() {
            }
            @Override
            public void onError(String message) {
            }
        });

When I looked inside the method definition, I have found that it does not call post rather it calls get() of OAuthJSONRequest class.

 public void saveIdentity(final OAuthUserCallback callback) {
        String url =  _oauth.getOAuthdURL() + "/api/usermanagement/user?k=" + _oauth.getPublicKey() + "&token=" + token;

        JSONObject postdata = new JSONObject();
        try {
            Iterator it = data.keySet().iterator();
            while (it.hasNext()) {
                String key = (String) it.next();
                postdata.put(key, data.get(key));
            }
        } catch (JSONException e) {
            callback.onError(e.getMessage());
            return;
        }

        new OAuthJSONRequest().get(url, new OAuthJSONCallback() {
            @Override
            public void onFinished(JSONObject data) {
                callback.onFinished();
            }

            @Override
            public void onError(String message) {
                callback.onError(message);
            }
        });
    }

Link to StackOverflow question: http://stackoverflow.com/q/34082103/1567675

Return Authorization Code -- PATCH FILE

Can you please advise me? @bumpmann @thyb @william26

This Is How You Do It With JavaScript.

OAuth.popup(provider, {
    state: oauthstate
}).done(handleOAuthAuthorization);
function handleOAuthAuthorization(result){
    $.ajax({
        url: 'index.php',
        type: 'POST',
        dataType: 'json',
        data: {
            code: result.code
        }
    }).done(function(r){
        handleOAuthCallback(r);
    });
}

What I'm Trying To Do With Android

OAuth o = new OAuth(this);
o.setOAuthdURL("https://andrew.easypparking.com:6284");
o.initialize("key");
JSONObject opts = new JSONObject();
JSONObject json = null;
try {
    json = getPostJSON("https://andrew.easypparking.com/apps/mobile/oauth/index.php?resource=genstate");
    opts.put("state", json.getString("oauthstate"));
} catch (JSONException e) {
    e.printStackTrace();
}
try {
    opts.put("oauthprovider", provider);
} catch (JSONException e) {
    e.printStackTrace();
}
o.popup(provider, opts, CurrentCallbackActivity.this);

Jar package is not the same as source package

The methods for OAuth.popup are also different in the Jar than the source of this project. Seems like the example app uses classes from the package in io.oauth while the JAR has everything in a com.webshell.oauth.

The callback methods are also different. The webshell classes do actually work and return the token and token secret, but doesn't return the user_id or screen_name.

The example app uses the io.oauth package, and that seems to actually show some ways to get userdata (i.e. in a Twitter example, I need the Alias to get more data about the auth'ing user)

I'll JAR up the source files (io.auth package) and see if I can use that.

Caching Login

Hi, I'm looking at the documentation and it says you can pass 'cache' as an option to the pop-up.
http://docs.oauth.io/?Android#authorize-with-a-popup

But doing this, nothing seems to happen, and looking through the source code, I don't think there's any handling for caching? Is the documentation incorrect that it's an option in your Android code?

fitbit login page is not responsive in Android devices

when calling fitbit login page is not responsive, password field is hiding by keyboard in ANdroid, but coming properly in IOS. Android fitbit login page is different then fitbit login page in IOS.
you can see difference in attached images,For IOS image name:IOS_fitbit_login and Android image: android_fitbit_login
android_fitbit_login
ios_fitbit_login

Can't find the sample app

From the readme page, you said the sample app is in example folder. So I want to let you know that I can neither find the sample app nor the folder you said it'll be found

onFinished never called

The onFinished method is never called. The popup is displaying some pin, but when I press back to return to the activity, onFinished is not called

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.